Answers for "print vs return in python"

1

print vs return in python

Use print when you want to show a value to a human. return is a keyword. When a return statement is reached, Python will stop the execution of the current function, sending a value out to where the function was called. Use return when you want to send a value from one point in your code to another.
Posted by: Guest on July-13-2021
1

print vs return in python

Use print when you want to show a value to a human. return is a keyword. When a return statement is reached, Python will stop the execution of the current function, sending a value out to where the function was called. Use return when you want to send a value from one point in your code to another.
Posted by: Guest on July-13-2021

Browse Popular Code Answers by Language