This commit is contained in:
adii1823
2021-10-28 17:38:16 +05:30
parent ee641c189f
commit ef37ce0c4e
46 changed files with 524 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
# gen.filter.py
cubes = [x**3 for x in range(10)]
odd_cubes1 = filter(lambda cube: cube % 2, cubes)
odd_cubes2 = (cube for cube in cubes if cube % 2)