About 14,100,000 results
Open links in new tab
  1. python - How do I get ("return") a result (output) from a function

    You can use the return statement to return a value from a function, this does not make it so that the returned variable (value) becomes available in the scope of the caller. To use the value in …

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

  3. Python return statement - GeeksforGeeks

    Dec 10, 2024 · Returns the boolean value of a. Let’s explore python return statement in detail: def function_name (parameters): # Function body. return value. When the return statement is …

  4. python - How can I store a result of a function in a variable

    Generally, you return the value. Once you've done that, you can assign a name to the return value just like anything else: return random.random() As a side note -- The python tutorial is really …

  5. 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, …

  6. Python return Statement - AskPython

    May 11, 2023 · Python functions can return multiple values in a single return statement. The syntax is straightforward, it consists of the keyword return followed by an expression. Syntax: …

  7. Understanding How to Return a Value from a Function in Python

    To return a value from a function, use the return keyword followed by the value you want to return. It’s important to choose an appropriate data type for the return value based on your …

  8. Return Value from Function - Python Examples

    In this tutorial, you'll learn how to return a value from a function in Python, with the help of examples. You can return a value from a function in Python using return keyword. The syntax …

  9. How to return values from functions in Python | LabEx

    Mastering the art of returning values from functions is a fundamental skill in Python programming. This tutorial will guide you through the process of understanding function returns, exploring …

  10. Returning a function from a function – Python - GeeksforGeeks

    Mar 19, 2025 · Example 1: Returning a Function Without Arguments. Explanation: When A () is called, it returns B, which is assigned to return_fun. Calling return_fun () invokes B . Example …

Refresh