Answers for "how to change everything in a list into int python"

3

change string list to int list python

Use the map function (in Python 2.x):
results = map(int, results)

In Python 3, you will need to convert the result from map to a list:
results = list(map(int, results))
Posted by: Guest on January-02-2021
0

how can item in list change in int in python

list(map(int,['1','23','2','53','65']))
Posted by: Guest on August-16-2021

Code answers related to "how to change everything in a list into int python"

Python Answers by Framework

Browse Popular Code Answers by Language