def greeter(name):
print('Hey %s, I was going to call you
yesterday.'%name)
print('Damn %s, you grew so much since HS.'%name)
print('It was nice to see you %s!\n'%name)
The function is meant to grab a name and insert it in these greetings.
Input:
friends = ['kevin','Darwin','Erica']
for friend in friends:
print(greeter(friend))
Ouput:
Hey kevin, I was going to call you yesterday. Damn kevin, you grew so much since HS. It was nice to see you kevin!
None
Hey Darwin, I was going to call you yesterday. Damn Darwin, you grew so much since HS. It was nice to see you Darwin!
None
Hey Erica, I was going to call you yesterday. Damn Erica, you grew so much since HS. It was nice to see you Erica!
None
Question: Why is it that every time the function is executed on a friend in the for loop afterwards 'None' pops up?