Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

string of numbers to list of integers python

a_string = "1 2 3"
a_list = a_string. split()
#a_list >>> ['1','2','3']
int_list = [int(i) for i in list]
 
PREVIOUS NEXT
Tagged: #string #numbers #list #integers #python
ADD COMMENT
Topic
Name
4+8 =