SteelAngel
SteelAngel

Reputation: 145

Why does this return None?

I'm testing out repl.it (running Python 3.5.1) and I noticed that after every line of input into the console, the console replies with None. I'm not using any fancy definitions with forgotten return values, this happens even after assignment statements. What is going on here?

Example:

x,y,z=1,2,3
=> None
print(x+y+z)
6
=> None

Upvotes: 0

Views: 120

Answers (1)

Max Uppenkamp
Max Uppenkamp

Reputation: 974

None is the default return value of statements that do not have a return value. Some interpreter shells display it, some don't.

It's perfectly normal, don't worry about it.

Upvotes: 2

Related Questions