What does 'None' mean when a function returns?

Asked by emeka_nwankwo · 3 months ago

1 Answer

10
amorebise · 3 months ago Top Answer

If a function doesn't have a return statement, it automatically returns None. It’s Python's way of saying "I'm done, but I have nothing to give you."

It’s not an error; it just means the function was meant to do something (like print text) rather than calculate something.

Log in to add a comment.