odd and even
This commit is contained in:
parent
135cf9ae63
commit
a98f3b67b4
1 changed files with 11 additions and 0 deletions
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 a new issue