题解 | 删除字符串中出现次数最少的字符
import sys str_input = input() set_input = set(str_input) list_count = [] for ch in set_input: count = str_input.count(ch) list_count.append(count) min_count = min(list_count) for ch in set_input: count = str_input.count(ch) if count == min_count: str_input = str_input.replace(ch,"") print(str_input)