Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def strtolist(string) :
- lista = []
- while True:
- x = string.find(',')
- if x == -1:
- num = string
- lista.append(int(num))
- break
- num = string[0:x]
- lista.append(int(num))
- string = string[:0] + string[x+1:]
- return lista
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement