I'm trying to combine two user input strings from different functions and then have it print as one statement. I know to combine two regular strings (ones not in a function) I would use the '+' function, but I can't figure out how to do it with user input being from two different functions. Can anyone help? here is my code:
def get_first_name(first_name):
first_name = str(input('what is your first name?'))
len_firstName = 0
while len_firstName <= 0:
print('that is not valid, please try again.')
first_name = str(input('what is your first name?'))
len_firstName = len(first_name)
print(len(first_name))
return first_name
get_first_name(input)
def get_last_name(last_name):
last_name = str(input('what is your last name?'))
count_of_last_name = len(last_name)
if count_of_last_name < 1:
print('There is no last name.')
else:
print(last_name)
return last_name
get_last_name(input)
# This is what I am trying to do to combine the two but it doesn't work and I'm stuck:
full_name = get_first_name + get_last_name
print(full_name)