Robotics & Artificial Intelligence

What is the significance of non-returnable function?

Python Functions

1 Like

Answer

A non-returnable function is a function that does not return any value to its caller program. It is significant in situations where the function is only intended to perform a specific task — such as displaying output, modifying data, or printing results — without needing to send any result back to the main program. In such functions, the return statement is either omitted or used without any value, and Python implicitly returns the default value None. Non-returnable functions help in organising code into reusable modules even when no value needs to be passed back.

Answered By

1 Like


Related Questions