At Westonci.ca, we provide clear, reliable answers to all your questions. Join our vibrant community and get the solutions you need. Join our platform to get reliable answers to your questions from a knowledgeable community of experts. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.

Can you sort by reading the string in reverse in python?

Sagot :

Explanation:

# Let our string is brainlycom

Main = "brainlycom"

# First we will print the original string.

print("The original string : " + str(Main))

#Now Reverse Sort a String

Reverse_Sort= ''.join(sorted(Main, reverse=True))

print("String after reverse sorting : " + str(Reverse_Sort))

After running the above code you will get the result:

The original string : brainlycom

String after reverse sorting : yronmlicba