You separate the values you want to return by commas:
def get_name():
# you code
return first_name, last_name
The commas indicate it's a tuple, so you could wrap your values by parentheses:
return (first_name, last_name)
Then when you call the function you a) save all values to one variable as a tuple, or b) separate your variable names by commas
name = get_name() # this is a tuple
first_name, last_name = get_name()
(first_name, last_name) = get_name() # You can put parentheses, but I find it ugly
Return as a tuple, e.g.
Here is also the code to handle the result:
You separate the values you want to return by commas:
The commas indicate it's a tuple, so you could wrap your values by parentheses:
Then when you call the function you a) save all values to one variable as a tuple, or b) separate your variable names by commas