Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

converting list of string into integers

lis = ['1', '-4', '3', '-6', '7']
res = [eval(i) for i in lis]
print("Modified list is: ", res)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #converting #list #string #integers
ADD COMMENT
Topic
Name
9+9 =