I have a list with int values as strings as following:
>>> mylist = ['1', '2', '3', '4'] >> mylist ['1', '2', '3', '4']
I would like to convert all values in mylist to int’s.
I used following code to convert values of lists to int’s:
>>> output = map(int, mylist) >>> output [1, 2, 3, 4]
Now just observer both list output values, all values in mylist are strings and all values in output list are int’s.