Name Formatting Function

  • Share this:

Code introduction


This function takes two string arguments, first name and last name, and concatenates them with the first letters of both capitalized.


Technology Stack : String manipulation

Code Type : String formatting function

Code Difficulty : Beginner


                
                    
def format_name(first_name, last_name):
    return f"{first_name.capitalize()} {last_name.capitalize()}"