Created
August 10, 2012 20:22
-
-
Save zgohr/3317552 to your computer and use it in GitHub Desktop.
single line for loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my_list = [('one','two',),('three','four',)] | |
return [first + second for first, second in my_list] | |
# ['onetwo', 'threefour'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment