About 399,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 keyword followed by …

  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 return …

  3. Python return Keyword - W3Schools

    The return keyword is to exit a function and return a value. Statements after the return line will not be executed: print("Hello, World!") Define a function using the keyword def. Read more about functions …

  4. Python Return Function [With Examples]

    Oct 30, 2024 · In simple words, the function contains a return statement that sends back the data from the function to the caller. The syntax is given below. # computations or operations. return result. The …

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

  6. Python return Statement - Explained with Examples - Python Tutorial ...

    Learn how the return statement works in Python functions. Includes single and multiple return values, syntax, examples, and best practices.

  7. Python's `return` Method: A Comprehensive Guide - CodeRivers

    Mar 28, 2025 · In Python programming, the return statement plays a crucial role in functions. It is the mechanism by which a function can send a value (or values) back to the code that called it. …

  8. What Does Return Do in Python Functions?

    Oct 26, 2025 · In Python, the return statement plays a crucial role in the functionality of these functions. It is vital for developers, both new and seasoned, to understand the intricacies of the return …

  9. Understanding the `return` Statement in Python - codegenes.net

    Nov 14, 2025 · In Python, the `return` statement is a fundamental concept that plays a crucial role in the behavior of functions. It allows a function to send data back to the part of the code that called it. This …

  10. Python Return Statement: The Complete Guide - TheLinuxCode

    May 21, 2025 · When Python executes the return statement, two things happen: To truly appreciate the return statement, it helps to understand its origins. The concept of returning values from subroutines …