Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Question, how do you over multiple long lists (in python 2) especially if zip itself takes a long time to zip them, for example.


You use Python 3.

J/K, while this is technically a limitation of Python 2, there actually is izip in itertools package which is a generator and works in similar way to zip in python 3.


Awesome! I knew there was some lazy zip-ish thing for python 2. I personally hate using range(len(foo)) as anyone else.


You just use a for i in range(len(... and ignore this web article's opinion on it since the situation calls for it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: