题解 | #字符串排序#
字符串排序
http://www.nowcoder.com/practice/5190a1db6f4f4ddb92fd9c365c944584
s = input()
a = ''
for i in s:#空格也是元素
if i.isalpha():#但是空格不是字母,所以a中没有空格
a = a+i
b = sorted(a,key=str.upper)#返回只包含字母的列表
d = ''
index = 0
for j in range(len(s)):#空格也算长度
if s[j].isalpha():
d = d+b[index]
index = index+1
else:
d = d+s[j]
print(d)