str = "娜娜_二零零-酷我(ERFD)dgfdg国米_山地车-乘除法(ICEX)ifex愤愤然_概念人-维权(LUVD)cisnq框架内_聚合-阿文看(OMNS)cdwcgr"
flag = 0
for i in range(len(str)):
if i < len(str) - 1:
if str[i] in 'abcdefghigklmnopqrstuvwxyz' and str[i+1] not in 'abcdefghigklmnopqrstuvwxyz':
flag = 1
if flag == 0:
print (str[i],end=' ')
if flag == 1:
print (str[i],end=' ')
flag = 0
print("\n")
else:
print (str[i])
不是最优解,仅供参考!