string - Split when character changes in Python -
Then I have this string.
<6> / Code> so that I can replace so I used to remove Use: Then there is a dictionary which MAP for a character in the dial pad. 6 = M or 666 = O or 9 = W just like the phone's dial pad.
6 # 666 # 665533999 -> 6, 666, 66, 55, 33, 999
# split ('#') > And it does not understand what to do next. I have tried the methods of brute force which solves it to some extent, but is it easy or more elegant solution?
& gt; & Gt; & Gt; C = "6 # 666 # 665533999"> gt; & Gt; & Gt; ("6", '666', '66', '55', '33', '999 '] ["".
cmap = {'77': 'Q' '9999': 'z') #and further ...
Comments
Post a Comment