Skip to content

Commit 6569e11

Browse files
committed
use list comprehensions
1 parent 916e5ff commit 6569e11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Print_List_of_Even_Numbers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
print list(x for x in range(2,100,2))
1+
print [x for x in range(2, 100) if not x % 2]
2+
print range(2, 100, 2)

0 commit comments

Comments
 (0)