Hacker News new | past | comments | ask | show | jobs | submit login

For Python, I’d prefer a generator over appending. Less imperative style-wise and faster too I think.



Also working with iterables rather than requiring sequence.

Aka all the things the builtin does (well it also supports zipping an arbitrary number of iterables).


Indeed. FWIW I meant ‘comprehension, rather than ‘generator’, but hey, both would work




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: