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

    In this step-by-step tutorial, you'll learn how to use the Python return statement when writing functions. Additionally, you'll cover some good programming practices related to the use of …

  2. Python return statement - GeeksforGeeks

    Dec 10, 2024 · Let's explore python return statement in detail: def function_name (parameters): # Function body. return value. When the return statement is executed, the function terminates …

  3. python - How do I get ("return") a result (output) from a function

    The direct way is to return a value from the function, as you tried, and let the calling code use that value. This is normally what you want. The natural, simple, direct, explicit way to get …

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

    Oct 30, 2024 · In this Python tutorial, you will learn everything about the Python return function with practical examples and project-based scenarios. While working on a Python Project, I …

  5. Python return Statement - AskPython

    May 11, 2023 · The Python return statement is used in a function to return something to the caller program. We can use the return statement inside a function only. In Python, every function …

  6. Python Return Statements Explained: What They Are and Why You Use

    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 …

  7. How to use the return statement effectively in Python functions

    By the end of this tutorial, you will have a solid understanding of the return statement in Python functions. You will learn how to leverage it to create more versatile and reusable functions, …

  8. Python return statement - DigitalOcean

    Aug 3, 2022 · We can perform some operation in a function and return the result to the caller using the return statement. result = x + y. return result. Output: We can have expressions also …

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

  10. Python Return Statements In-Depth: What They Are and Why You Use

    Sep 3, 2024 · Return statements are a vital part of Python. This comprehensive expert guide will explain return statement semantics, applications, best practices and advanced usage – …

  11. Some results have been removed
Refresh