s='t1Hr2a3'
s1='' ; s2=''; i = 0
while i < len(s):
if '0'<=s[i]<='9':
s1 = s1 + s[i]
elif 'a'<=s[i]<='z':
s2 = s[i] + s2
i = i + 1
ans = s2 + s1
print(ans)
程序执行后,输出的结果是( )
微信扫码预览、分享更方便