题解 | #找出字符串中第一个只出现一次的字符#
找出字符串中第一个只出现一次的字符
https://www.nowcoder.com/practice/e896d0f82f1246a3aa7b232ce38029d4
str1=input()
r=-1
#学习string.count(substr,start,end)的用法
for x in str1:
if str1.count(x)==1:
r=1
print(x)
break
if r==-1:
print(r)
格力公司福利 280人发布
查看14道真题和解析