def func(l):
d = dict()
for each in l:
if each not in d:
d[each] = 1
else:
d[each] += 1
new = [m for m,n in d.items() if n == 2]
return new
def func(a,b,c):
with open(a,'r') as f:
stra = f.readline()
with open(b,'r') as f:
strb = f.readline()
new = ''.join(reversed([stra,strb]))
with open(c,'w') as f:
f.write(new)
strs = input('请输入字符:')
try:
new = strs.upper()
except Exception as e:
print(e)
else:
with open('test.txt','w',encoding='utf-8') as f:
f.write(new)