Skip writes: > thought the definition for list comprehension syntax was something like > > '[' > <expr> for <vars> in <expr> > [ for <vars> in <expr> ] * > [ if <expr> ] * > ']' Nope: >>> [x*y for x in 'aBcD' if x.islower() for y in range(4) if y%2] ['a', 'aaa', 'c', 'ccc'] -- Michael Chermside
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