I have a string, and I would like to split it by alphabet character and keep this character with the right-hand side of the split.
Let say I have this string :
<code>x = '1456p6'
</code>
<code>x = '1456p6'
</code>
x = '1456p6'
I would like to get the following :
<code>['1456', 'p6']
</code>
<code>['1456', 'p6']
</code>
['1456', 'p6']
Using this regex, I was only able to get the following:
<code>re.split('(d+)', s)
> ['1456', 'p', '6']
</code>
<code>re.split('(d+)', s)
> ['1456', 'p', '6']
</code>
re.split('(d+)', s)
> ['1456', 'p', '6']
I could join the last two parts of the split, but is there a better way to to do it ?