About 1,150,000 results
Open links in new tab
  1. The Python return Statement: Usage and Best Practices

    In Python, the return statement allows you to send values back to the caller from a function. To return a single value, use the return keyword followed by the value. This can be any data type, …

  2. Python return statement - GeeksforGeeks

    Dec 10, 2024 · A return statement is used to end the execution of the function call and it "returns" the value of the expression following the return keyword to the caller. The statements after the …

  3. Python return Keyword - W3Schools

    Python Keywords. Exit a function and return the sum: The return keyword is to exit a function and return a value. Statements after the return line will not be executed: print("Hello, World!") …

  4. python - What is the purpose of the return statement? How is it ...

    return makes the value (a variable, often) available for use by the caller (for example, to be stored by a function that the function using return is within). Without return, your value or variable …

  5. Python Return Function [With Examples] - Python Guides

    Oct 30, 2024 · Let’s understand how the return keyword works and how we can use it in the function in Python. Return in Python is used to break or exit the function and also returns a …

  6. Python return Statement - AskPython

    May 11, 2023 · The Python return statement is used in a function to return something to the caller program. We can use the return statement inside a function only. In Python, every function …

  7. Mastering the return Statement in Python Functions

    Jan 29, 2025 · The `return` statement within a function is a crucial element that allows functions to send back a value or values to the point where the function was called. Understanding how the …

  8. Python Return Keyword - Online Tutorials Library

    Python Return Keyword - Learn about the Python return keyword, its syntax, and how to use it effectively in your functions to return values.

  9. The Python Return Statement : Usage and Best Practices

    The return statement in Python is used to exit a function and return a value to the caller. It allows you to pass back a specific result or data from a function, enabling you to utilize the output for …

  10. How to use the return statement effectively in Python functions

    By the end of this tutorial, you will have a solid understanding of the return statement in Python functions. You will learn how to leverage it to create more versatile and reusable functions, …

  11. Some results have been removed
Refresh