题解 | #删除字符串中出现次数最少的字符#
删除字符串中出现次数最少的字符
https://www.nowcoder.com/practice/05182d328eb848dda7fdd5e029a56da9
string=input() strings={} for i in string: if i in strings: strings[i]+=1 else: strings[i]=1 code=min(strings.values()) for i in string: if strings[i]==code: string=string.replace(i,'') print(string)