题解 | #字符串排序#
字符串排序
https://www.nowcoder.com/practice/5190a1db6f4f4ddb92fd9c365c944584
while True:
try:
s = input()
a = ''
for i in s:
if i.isalpha():
a += i
b = sorted(a, key=str.upper)
index = 0
d = ''
for i in range(len(s)):
if s[i].isalpha():
d += b[index]
index += 1
else:
d += s[i]
print(d)
except:
break