Skip to content

Commit

Permalink
Print even numbers in a list on python
Browse files Browse the repository at this point in the history
  • Loading branch information
dark authored and dark committed Sep 30, 2022
1 parent 456834b commit 2895315
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/evennumbers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
list1 = [10, 21, 4, 45, 66, 93]

for num in list1:

# checking condition
if num % 2 == 0:
print(num, end = " ")

0 comments on commit 2895315

Please sign in to comment.