Run
string = 'apple' sorted_chars = sorted(string, reverse=True) sorted_string = ''.join(sorted_chars) print(sorted_string)
Output