"Emile van Sebille" <emile at fenx.com> wrote in message news:9b71c7$7sse3$1 at ID-11957.news.dfncis.de... > I suspect the answer lies somewhere in the comma converting the parts of the > list comprehension into a list itself, much as the comma is used in normal > iteration idiom: > > for i in 1,2 Bingo! The rule is the same: "parentheses don't make tuples, COMMAS make tuples" [with the sole exception of the empty tuple, whose literal form is comma-less]. E.g., note the difference the comma makes here: >>> for x in 'ciao',: ... print x ... ciao >>> for x in 'ciao': ... print x ... c i a o >>> Alex
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4