Is there a way to elegantly take the (e.g. ) 2nd 7th and 10th element in a list

i.e.
more elegant than
[arr[x] for x in [1,6,9] ]

along the lines of
arr[1,6,9]

not a big issue, but i am curious

-- vish
_______________________________________________
Python-il mailing list
[email protected]
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il

לענות