String Alphabetical Sorting Function

  • Share this:

Code introduction


This function returns the input string sorted alphabetically.


Technology Stack : String sorting

Code Type : String operation

Code Difficulty : Beginner


                
                    
def aordify(string):
    """
    This function returns the string with its characters sorted alphabetically.
    """
    return ''.join(sorted(string))                
              
Tags: