Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

alex23 wuwei23 at gmail.com
Tue Apr 8 20:39:49 EDT 2014


On 8/04/2014 6:21 PM, Steven D'Aprano wrote:
> Functions which are intended to return a value may be named as verbs:
> [...]
> or as nouns:
> int

Shorthand for 'integerise'.

> str

'stringify'

> dict

'dictionarate'

> coordinate
> array

These are both verbs.




...I'll get me coat.




More information about the Python-list mailing list