SyntaxFix
Write A Post
Hire A Developer
Questions
Yet Another Option:
>>> [re.split(r'(\d+)', s) for s in ('foofo21', 'bar432', 'foobar12345')] [['foofo', '21', ''], ['bar', '432', ''], ['foobar', '12345', '']]