Python Iteration Protocol site:stackoverflow.com - Search