Skip to content

Instantly share code, notes, and snippets.

@theeluwin
Last active January 4, 2016 01:09
Show Gist options
  • Select an option

  • Save theeluwin/8546603 to your computer and use it in GitHub Desktop.

Select an option

Save theeluwin/8546603 to your computer and use it in GitHub Desktop.
list comprehension odd lex
a = 1
b = [2, 3, 4, 5]
print a in [(a - 1) for a in b] # True
print [(a - 1) for a in b] # [1, 2, 3, 4]
print a # 5
@theeluwin
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment