I have a list of integer strings to sort. The format is like this:
l= ['17', '23', '35', '79', .....]
I need to convert each numeric string into an integer so that I can sort their numeric value. I have tried the following,
l.sort(key=int)
However, I got
invalid literal for int() with base 10: ' '
I think it is due to the whitespace in between the strings. Is that correct? If so, how do I solve it?