如何将字符串中的所有数字映射到Python中的列表?

Joh*_*ith 1 python string

说我有一个字符串

"There are LJFK$(#@$34)(,0,ksdjf apples in the (4,5)"  
Run Code Online (Sandbox Code Playgroud)

我希望能够将数字动态提取到列表中:[34, 0, 4, 5].
有没有一种简单的方法在Python中执行此操作?

换句话说,
有没有办法提取由任何分隔符分隔的连续数字簇?

phi*_*hag 7

当然,使用正则表达式:

>>> s = "There are LJFK$(#@$34)(,0,ksdjf apples in the (4,5)"
>>> import re
>>> list(map(int, re.findall(r'[0-9]+', s)))
[34, 0, 4, 5]
Run Code Online (Sandbox Code Playgroud)