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