i'm using python 101 version 4.1
Example of input is (1,4,6,2,53,7)
Needed output is even(2,4,6) odd(1,7,53)
I need to use a function in this question with 1 input only which will be the list, i think a loop will help but i can't still get it. i tried using the following code:
from math import *
from string import *
def odd_even(L):
list1=raw_input()
list1=list1.split(" ")
even=[]
odd=[]
for x in list1:
if x%2==0:
even.append(L)
else:
odd.append(L)
return even,odd
L=input()
print odd_even(L)