7 lines
172 B
Python
7 lines
172 B
Python
|
import re
|
||
|
# Sample string.
|
||
|
text = "Ten 10, Twenty 20, Thirty 30"
|
||
|
result = re.split("\D+", text)
|
||
|
# Print results.
|
||
|
for element in result:
|
||
|
print(element)
|