Skip to content

Instantly share code, notes, and snippets.

@nati
Created February 4, 2014 22:17
Show Gist options
  • Select an option

  • Save nati/8813477 to your computer and use it in GitHub Desktop.

Select an option

Save nati/8813477 to your computer and use it in GitHub Desktop.
>>> a = [(1,),(2,),(3,)]
>>> [a[0] for x in a]
[(1,), (1,), (1,)]
>>> [x[0] for x in a]
[1, 2, 3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment