Skip to content

Commit bf78ecd

Browse files
Merge pull request geekcomputers#176 from ZivLi/Ziv-commit
more pythonic
2 parents 916e5ff + a27ab49 commit bf78ecd

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)