Python. Code Challenge: Loops. "None" appearing when I run code

Hi, I am currently working through the lessons in Python and I’m stuck in the Code Challenge: Loops. My issue is that when I use my code I get a None response and I don’t know why. I thought it wouldn’t be there, yet it is. Can anyone explain to me why None is still being returned from the function? (it may not come from the function idk what’s going on).

Code Below:

def add_greetings(names):
greetings =
for name in names:
greetings.append(name)
print("Hello, " + name )

print(add_greetings([“Owen”, “Max”, “Sophie”]))

Answer Below:

Hello, Owen
Hello, Max
Hello, Sophie
None

Please format your code next time.

The answer here is pretty clear. You’re printing the return value of add_greetings, which doesn’t return anything, and therefore is None.

1 Like

I see the problem now, thank you!!!

1 Like