题解 | #字符串排序#
字符串排序
https://www.nowcoder.com/practice/5190a1db6f4f4ddb92fd9c365c944584
s = input()
ss = []
for i in s:
ss.append(i)
a = []
index = []
for i in range(len(s)):
if ss[i].isalpha():
a.append(ss[i])
index.append(i)
#a.sort(key=lambda x:x.upper())
a = sorted(a,key=str.lower)
c = 0
for i in index:
ss[i] = a[c]
c += 1
print(''.join(ss))