题解 | 找出字符串中第一个只出现一次的字符
找出字符串中第一个只出现一次的字符
https://www.nowcoder.com/practice/e896d0f82f1246a3aa7b232ce38029d4
import sys while True: try: s = input() j = 0 for i in range(len(s)): if s.count(s[i]) == 1: print(s[i]) j = 1 break if j == 0: print(-1) break except: break