题解 | 找出字符串中第一个只出现一次的字符
a=input() b=sorted(a,key=lambda x:a.count(x)) for i in b: if b.count(i)==1: print(i) break else: print("-1") break
a=input() b=sorted(a,key=lambda x:a.count(x)) for i in b: if b.count(i)==1: print(i) break else: print("-1") break
相关推荐