day 26 - comprehensions
This commit is contained in:
5
026/task.py
Normal file
5
026/task.py
Normal file
@ -0,0 +1,5 @@
|
||||
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
new_numbers = [ n for n in numbers if n % 2 == 1 ]
|
||||
|
||||
print(new_numbers)
|
||||
Reference in New Issue
Block a user