input comma separated numbers, convert them into integer from string and then into integer list. this is what i came up with. is there any other way?
x = list(map(lambda x : int(x),(input()).split(",")))
print(x)
input : 1,2,3,55,66,714,78
output : [1, 2, 3, 55, 66, 714, 78]
list(map(int, input.split(',')))lambdais not needed asmapmaps each element in the list toint. So answer your question, yes - there are many ways. But this is generally the most efficient.().