Skip to content

Instantly share code, notes, and snippets.

@jefftrudeau
Created May 29, 2013 22:46
Show Gist options
  • Save jefftrudeau/5674434 to your computer and use it in GitHub Desktop.
Save jefftrudeau/5674434 to your computer and use it in GitHub Desktop.
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
evens = [i for i in a if i % 2 == 0]
odds = [i for i in a if i % 2 == 1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment