Run
x = '21,14,44,8,62' #split string by comma output = x.split(',') #convert each element in list to int output = [int(n) for n in output] print(output)
Output