Skip to content

Instantly share code, notes, and snippets.

@zgohr
Created August 10, 2012 20:22
Show Gist options
  • Save zgohr/3317552 to your computer and use it in GitHub Desktop.
Save zgohr/3317552 to your computer and use it in GitHub Desktop.
single line for loop
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