odd and even
This commit is contained in:
parent
135cf9ae63
commit
a98f3b67b4
11
odd.even.py
Normal file
11
odd.even.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
a = [23, 56, 44, 12, 13, 97, 45, 39, 80, 54]
|
||||||
|
odd = []
|
||||||
|
even = []
|
||||||
|
|
||||||
|
for i in a:
|
||||||
|
if i % 2 == 0:
|
||||||
|
even.append(i)
|
||||||
|
else:
|
||||||
|
odd.append(i)
|
||||||
|
print(odd)
|
||||||
|
print(even)
|
Loading…
Reference in New Issue
Block a user