String Sorting Function

  • Share this:

Code introduction


This function sorts the characters in a string in alphabetical order.


Technology Stack : Built-in functions

Code Type : String processing

Code Difficulty :


                
                    
def string_sort(input_str):
    """
    Sorts the characters in a string in alphabetical order.
    """
    return ''.join(sorted(input_str))