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

    In this tutorial, you’ll learn that: You use return to send objects from your functions back to the caller code. You can use return to return one single value or multiple values separated by …

  2. Python return statement - GeeksforGeeks

    Dec 10, 2024 · In Python, functions are first-class citizens, meaning you can return a function from another function. This is useful for creating higher-order functions. Here's an example of …

  3. 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 …

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

    Oct 30, 2024 · In this Python article, you learn everything about the Python return function with multiple examples, such as what happens when you don’t use the return statement. Then, you …

  5. Python return Statement - AskPython

    May 11, 2023 · In Python, the return statement exits a function and returns the specified value to the caller. Multiple return statements may exist in a function, but only the one that fulfils the …

  6. Python Function Return Value - W3Schools

    To let a function return a value, use the return statement: Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, …

  7. Python Function Return | Function Return Statement in Python

    Mar 2, 2023 · In Python, a function can return a value or multiple values using the return statement. The return statement takes an expression as an argument, evaluates it, and returns …

  8. Return a Function in Python - How-To Guide with Examples

    May 3, 2024 · Here are two examples of returning a function from a function in Python: Example 1: Returning a Function That Multiplies Any Number By a Given Factor: def multiply(factor): …

  9. Python - Return Function from Function - Python Examples

    In this tutorial, we will learn how to return a function and the scenarios where this can be used. 1. A simple example to return a function. In the following program, we define two functions: …

  10. Python Return Statement (Explicit and Implicit) - Python Mania

    In Python, a return statement is used to exit a function and optionally return a value to the caller. When a return statement is encountered in a function, the function stops executing, and the …

  11. Some results have been removed