even = [] odd = []

for num in range(1,11): if num % 2 == 0: even.append(num) else: odd.append(num)

print(even) print(odd)

Built With

Share this project:

Updates