How do I turn these numbers into a list using python?
16 3 2 13 -> ["16","3","2","13"]
How do I turn these numbers into a list using python?
16 3 2 13 -> ["16","3","2","13"]
If you just want to split by whitespaces.
data = '16 3 2 13'
print(data.split())
a = '16 3 2 13'
b = ['']
print(type(b))
print(len(b))
j = 0
for i in range(len(a)):
if a[i] != ' ':
b[j] = b[j] + a[i]
else:
j = j+1
b.append('')
print(b)