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