0 votes
in Python by
What happens when a function doesn’t have a return statement? Is this valid?

1 Answer

0 votes
by

Yes, this is valid. The function will then return a None object. The end of a function is defined by the block of code is executed (i.e., the indenting) not by any explicit keyword.

Related questions

0 votes
asked May 16, 2020 in Python by Robindeniel
+1 vote
asked Feb 15, 2021 in Python by SakshiSharma
...