Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jeacom25b/00ad4625de8197d3073b90869cce9206 to your computer and use it in GitHub Desktop.
Save jeacom25b/00ad4625de8197d3073b90869cce9206 to your computer and use it in GitHub Desktop.
list comprehension
c = [a * sum([b for b in range(10) if (b + 1) % 2]) for a in range(10)]
print(c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment