What is the difference between return and print?

Python control flow and functions · Freshers

Model answer

print shows text on the screen and returns None. return sends a value back to the caller so it can be stored or used, and ends the function. Functions should usually return values and let the caller decide how to display them.

Learn this topic

Functions in Python: def, Arguments and return in the course Python for Beginners: Learn to Code with Real Projects.

Sign in to add your own answer.

More questions