Call int() function on every list element?

This is what list comprehensions are for:

numbers = [ int(x) for x in numbers ]

Leave a Comment