如果我有一个列表字符串:
first = []
last = []
my_list = [' abc 1..23',' bcd 34..405','cda 407..4032']
我将如何将 .. 两侧的数字附加到相应的列表中?要得到:
first = [1,34,407]
last = [23,405,4032]
我也不介意字符串,因为我可以稍后转换为 int
first = ['1','34','407']
last = ['23','405','4032']