题解 | #字符统计#
字符统计
http://www.nowcoder.com/practice/c1f9561de1e240099bdb904765da9ad0
while True: try: m = input() s = sorted(m,key=ord) string = '' result = [] for i in s: if i.isalpha() or i.isdigit() or i == ' ': if i not in string: string += i for i in string: result.append(s.count(i)) result.sort(reverse=True) sort_s = '' for i in range(len(result)): for j in s: if result[i] == s.count(j) and j not in sort_s: sort_s += j print(sort_s) except: break