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

    See how Python return values work, including multiple results, so you write clear, testable functions. Follow examples and practice as you go.

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

    Often, people try to use print in a loop inside a function in order to see multiple values, and want to be able to use the results from outside. They need to be returned, but return exits the …

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

  4. Python return Keyword - W3Schools

    Definition and Usage The return keyword is to exit a function and return a value.

  5. Python return statement - GeeksforGeeks

    Dec 20, 2025 · The return statement is used inside a function to send a value back to the place where the function was called. Once return is executed, the function stops running, and any …

  6. Mastering the `return` Statement in Python - CodeRivers

    Apr 10, 2025 · Understanding how to use return effectively is essential for writing clean, modular, and efficient Python code. This blog post will explore the fundamental concepts, usage …

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

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

  10. return | Python Keywords – Real Python

    In this example, the add() function takes two numeric values as arguments and returns their sum. The return keyword sends the result of a + b back to where the function was called and stores …