3 ms·
I understand superficially that this works, but can you explain the syntax (or is there a name for this)? So far I've also seen a for loop like for i in [1
by spraak 10y ago
I understand superficially that this works, but can you explain the syntax (or is there a name for this)? So far I've also seen a for loop like
for i in [1,2,3]:
...
- spraak 10y agoAnswer to my question: https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions https://docs.python.org/2/tutorial/datastructures.html#list-...