Skip to content

Instantly share code, notes, and snippets.

@lewisbar
Created October 9, 2021 23:29
Show Gist options
  • Save lewisbar/e276334219308c1e8a00e799618a844f to your computer and use it in GitHub Desktop.
Save lewisbar/e276334219308c1e8a00e799618a844f to your computer and use it in GitHub Desktop.
Prime Numbers Oneliner
print(*filter(lambda x: all([x % i != 0 for i in range(2, x)]), range(2, int(input("Enter upper bound\n")))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment