rakesh sharma
2015-06-10 10:36:23 UTC
I have come across this syntax in python. Embedding for loop in []. How far can things be stretched using this [].
l = [1, 2, 3, 4, 5]
q = [i*2 for i in l]
print qthanksrakesh
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
l = [1, 2, 3, 4, 5]
q = [i*2 for i in l]
print qthanksrakesh
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor