Created
March 29, 2020 16:43
-
-
Save Deep18-03/89e88ef96501060f0d25a21c0e2339b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#use concept of list comprehension | |
a = [1, 1, 2, 3, 5, 2, 13, 21, 34, 55, 89] | |
print([a for a in a if a < 5]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
print([number for number in a if number < 5])
proper way