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

    The Python return statement is a special statement that you can use inside a function or method to send the function’s result back to the caller. A return statement consists of the return …

  2. Python Return Function [With Examples]

    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.

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

  4. Python return Statement - AskPython

    May 11, 2023 · Let’s look at a simple example of a function that takes two numbers to perform a calculation and return the total to the caller. We can optimize the function by having the …

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

  6. Python Return Statement - Syntax, Usage, and Examples - Mimo

    Master Python's return statement to exit functions, send back values, and handle conditions. Learn syntax, best practices, and real-world examples.

  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 Statements Explained: What They Are and Why …

    Jan 4, 2020 · All functions return a value when called. If a return statement is followed by an expression list, that expression list is evaluated and the value is returned: ... If no expression …

  9. Python Function Return Values: Explained with Examples

    In this article, we will explore Python function return values, what they are, how they work, and provide examples to illustrate their usage. 1. Understanding Python Functions. 2. Return …

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

  11. Some results have been removed
Refresh