News for hackers. Stuff that matters.
Re:Strange line of Python by zidar on Friday November 18, 2011 @08:02AM (#3251574)
may be trivial but to me it looks weird

  print aa for aa in someList
means "print aa" is the body of the for loop in this case and not knowing python at all, I thought it would be the same for more neste for loops

  (print x for x in something) for something in somethingElse
anything else would just seem weird to me, but i guess that print x is actuall the body of both nested for loops.

There are no comments on this comment yet.