+ 1
Split string with numbers
I need help to create a list of a String that contains numbers: Example with that string "2019hello2bye2018" I get ['2019', 'hello', '2', 'bye', '2018']. With the re achieve the numbers split = [int (s) for s in re.findall (r '-? \ D + \.? \ D *', self.value)], but I do not know how to get everything. Thank you!
1 Antwort