Convert a list of strings [ '3', '1' , '2'] to a list of sorted integers [ 1, 2, 3] in Python, how?
- by Shamim
I have:
L1 = ['11', '10', '13', '12', '15', '14', '1', '3', '2', '5', '4', '7', '6', '9', '8']
this is a list of strings, right?
I need to make it a list of integers as follows:
L2 = [11, 10, 13, 12, 15, 14, 1, 3, 2, 5, 4, 7, 6, 9, 8]
finally I will sort it like below:
L3 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] by L2.sort()
please let me know how I can get to L3 from L1