Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Strange line of Python. Parent comment
I've been programming python for quite a while, and never seen anything like
main_iterator = 'abc' inner_iterator = '123' [c+n for c in main_iterator for n in inner_iterator]
Once you know what that means, it's obvious what you mean by
[j for i in main_iterator for j in inner_iterator(i)]
There are no comments on this comment yet.
I've been programming python for quite a while, and never seen anything like
It's just ugly. I guess it has its purpose (cross products?) but it's still ugly.Once you know what that means, it's obvious what you mean by
But I've just never seen two loops crushed together like this.