Formatting Names with Capitalization

  • Share this:

Code introduction


Capitalize the first and last name of the given names and return the formatted full name.


Technology Stack : str.capitalize()

Code Type : String processing

Code Difficulty :


                
                    
def format_name(first_name, last_name):
    """
    Capitalize the first and last name and return the formatted name.
    """
    return f"{first_name.capitalize()} {last_name.capitalize()}"