Skip to content

Instantly share code, notes, and snippets.

@tonijz
Created May 10, 2013 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonijz/5554867 to your computer and use it in GitHub Desktop.
Save tonijz/5554867 to your computer and use it in GitHub Desktop.
In [32]: data = [('TEST', 1), ('TEST2', 2), ('TEST3', 3)]
In [33]: print [x[1] for x in data if x[0] == 'TEST']
[1]
In [34]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment