← Back to challenges

Concatenate First and Last Name into One String

PythonMediumstringsformattinglanguage_fundamentals

Instructions

Given two strings, first_name and last_name, return a single string in the format "last, first".

Examples

concat_name("First", "Last") ➞ "Last, First"

concat_name("John", "Doe") ➞ "Doe, John"

concat_name("Mary", "Jane") ➞ "Jane, Mary"
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.