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))
Tag Archive: string
Categories
- Python (3)
- System Administration (2)
- System Security (6)
- Virtualization (6)
Recent Posts
Calendar
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
« Feb | ||||||
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |