Why you add 'list()' here? Generic python iterator is more memory efficient