+ 3
map applies a function to all elements of a sequence. l = ['1', '2', '3'] # list with strings print(list(map(int, l))) # apply int() to each element of the list, result: [1, 2, 3]
18th Apr 2019, 5:46 PM
Anna
Anna - avatar