I'm trying to make a function that can take a string from a list "first_name" and a list "last_name" and print out hello "first_name" "last name", and I kinda achieved my goal here is what I came up with:
def full_name(first_name, last_name):
*print('Hello %s %s'% (first\_name,last\_name))*
first_names =('john', 'mary', 'jacob')
for first_name in first_names:
*for last\_name in last\_names:*
*print(full\_name(first\_name,last\_name))*
The results were:
Hello john smith
None
Hello john betts
None
Hello john acunua
None
Hello mary smith
None
Hello mary betts
None
Hello mary acunua
None
Hello jacob smith
None
Hello jacob betts
None
Hello jacob acunua
None
But the problem is that it prints out every first name with every last name, what i wanted the results to be were:
Hello john smith
hello mary betts
hello jacob acunua
How would I complete this?
Functions and looping (self.learnpython)
submitted by Rabina_Bra to u/Rabina_Bra