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

Mark Lawrence breamoreboy at yahoo.co.uk
Sun Apr 6 16:56:05 EDT 2014


On 06/04/2014 21:10, Marko Rauhamaa wrote:
>
> Many classic CS ideas are expressed in terms of an Algol-like language.
> Nothing would prevent you from framing those ideas in a Python-like
> (pseudo)language. The question is mostly whether you prefer begin/end,
> braces or indentation.
>

Of course whilst all this work in the fields of languages, algorithms 
and such like has been going on, in parallel engineers have been working 
on the hardware side of things.  My understanding is that some abacuses 
now have as many as ten strings on them.  Although this scale was at 
first difficult for the users to grasp, the designers came up with the 
fantastic idea of using different coloured beads on different strings to 
simplify the user experience.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com





More information about the Python-list mailing list