If I have an input string:
a = 'W1 W2 W3 W4 W5 W6 W7 W8 W9 W10 W11'
How to extract the numbers and store in a list? For example
numList = [1,2,3,4,5,6,7,8,9,10,11]
I have tried doing it like this:
[int(t) for t in a if t.isdigit()]
This only works for the single digit numbers, but doesn't work for the double digit numbers.