Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What happens when a function doesn’t have a return statement? Is this valid?
Answer:

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

Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook