Where can I find syntax for list comps? I am confused how/whether they are evaluated left-right or right-left. Consider following list flattening example:
mx = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] [value for row in mx for value in row] [1, 2, 3, 4, 5, 6, 7, 8, 9] It seems like 'for' loops are evaluated from left to right (returned 'row' is passed to right side for), but return 'value' (from second for loop) is not on right, but left side. That's a bit confusing syntax for me. Sorry if I am not clear in explaining it. What is the reasoning behind this syntax? -jM _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor