在一个字符串中找到第一个只出现一次的字符,并返回它的位置。 Input: abacc Output: b 解题思路 class Solution: def FirstNotRepeatingChar(self, s): # write code here for i in s: if s.count(i)==1: return s.index(i) return -1