12/18 why "none"?


#1

Hello friends, I would like to know why my Code prints “None” in the console? This is my Code:

n = [3, 5, 7]

def print_list(x):
for i in range(0, len(x)):
print x[i]
print print_list(n)

And the Outcome in the console:

3
5
7
None

Thank you very much! =)


#2

It prints None because there is no return value. It can be ignored.


#3

Thank you=) So now i just called the function without printing it again and the “None” disappeared.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.