def mystery(s): return "".join(sorted(set(s), reverse=True)) print(mystery("programming"))
“programming”
rponmiga
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!