I tried using below code but list contains integers as characters
>>>a=input().split()
2 3 4
>>>print(a)
['2','3','4']
>>> a=list(map(int,input().split()))
1 2 3
>>> print(a)
[1, 2, 3]
Try using this code. Here map() function is used,which returns a map object and we can use list to store the input in a list