Convert a list of strings to integers
This method is much handy when we take user input that comes as a string. The below line of python can convert your list of strings to integers.
Python: 3.0    Anurag Rana    16 Jul 2021   0
Login to upvote
1
2
3
4
list(map(int, ['1', '2', '3']))

# output
# [1, 2, 3]
Copy | Download as: .py file   PNG
Share on: FB   Twitter   LinkedIn   WA
©2021 - code108labs   Contributors   Hosted on DigitalOcean   Partner website: pythoncircle.com