Using List Comprehension I want to Print odd even with string indicating "Even" for even numbers and "Odd for odd numbers
Using below code - I am getting only even and odd. Just wondering if i can get both values and corresponding to them stating even/odd.
obj = ["Even" if i%2==0 else "odd" for i in range(20)]
print(obj)
Using List comprehension only.