题解 | #字符串合并处理#
字符串合并处理
http://www.nowcoder.com/practice/d3d8e23870584782b3dd48f26cb39c8f
```while True:
try:
s1, s2 = input().split()
# 第一步:合并两个字符串:
s = list(s1 + s2)
# 第二步:对字符串排序:
s[::2] = sorted(s[::2])
s[1::2] = sorted(s[1::2])
# 第三步:字符转换:
res = []
for i in s:
if i in '0123456789abcdefABCDEF':
tmp = bin(int(i,16))[2:].rjust(4,'0')[::-1]
res.append(hex(int(tmp,2))[2:].upper())
else:
res.append(i)
print(''.join(res))
except:
break