python分离字符和数字

from itertools import groupby
s = 'HPO:0000234'
ss = [''.join(list(g)) for k, g in groupby(s, key=lambda x: x.isdigit())]
print(ss)

 

    原文作者:automan_huyaoge
    原文地址: https://blog.csdn.net/u012410628/article/details/106549644
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞