0
Output answer in Tuple.....How can I get output in Tuple
T=() tl = tuple(eval(input("Enter the tuple:"))) for i in tl: if i%2 !=0: print('-1', end =' ') else: print(i, end = ' ')
1 Answer
+ 3
tpl = tuple(x if x % 2 == 0 else -1 for x in tuple(eval(input())))
print(tpl)