Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save timeowilliams/57e39f8688c7ade811d7c49fd28fd6f3 to your computer and use it in GitHub Desktop.

Select an option

Save timeowilliams/57e39f8688c7ade811d7c49fd28fd6f3 to your computer and use it in GitHub Desktop.
Practice Python 7: Using List Comprehensions
numbers = [3,6,7,8,10,12,13]
even_numbers = [num for num in numbers if num % 2 == 0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment