Split based by a-z character in an alphanumeric string in python
Posted
by AdamB
on Stack Overflow
See other posts from Stack Overflow
or by AdamB
Published on 2010-06-01T21:19:53Z
Indexed on
2010/06/01
21:23 UTC
Read the original article
Hit count: 196
python
I have strings like "5d4h2s", where I want to get 5, 4, and 2 from that string, but I also want to know that 5 was paired with d, and that 4 was paired with h, etc etc. Is there an easy way of doing this without parsing char by char?
© Stack Overflow or respective owner