разделить список в ровных и нечетных числах Python
# program that splits even and odd digit from inputed list.
list=eval(input("list of digits"))
even_list=[]
odd_list=[]
for i in list :
if i%2==0 :
even_list.append(i)
else:
odd_list.append(i)
print('even list :',even_list)
print('odd list :',odd_list)
--------------------------------------------------------------------------------
output:
list of digits[0,1,2,3,4,5,6,7,8,9]
even list : [0, 2, 4, 6, 8]
odd list : [1, 3, 5, 7, 9]
--------------------------------------------------------------------------------
Gr@Y_orphan_ViLL@in##