Coding Tricks

change list of string to list of int

1
2
3
4
5
6
## let's say fileindices is a list of string: ['1','2','3',...]
## and now we want to change it to [1,2,3,...]

## Using the map function:

fileindices = map(int, fileindices)