In Python 2, we can convert all the elements of a list into integers using “map” function as follows :
myListName = map(int, myListName)
in Python 3, map returns a map object which you can convert to a list if you want:
numbers = list(map(int, numbers))