from collections import Counter
with open('test.input') as fd: # the string is in the "test.input" file
c = Counter(fd.read())
string = ''.join(sorted(c.keys(), key=lambda x: -1 * c[x]))
print(string[:string.index('_')])
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
My solution. In python.