About 13,500,000 results
Open links in new tab
  1. 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 …

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

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

    Effectively, there are two ways: directly and indirectly. 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. …

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

  5. Returning Values in Python: A Comprehensive Guide

    Jan 24, 2025 · Returning values from a function enables you to pass data back to the calling code, which can then use this data for further processing. This blog post will dive deep into the …

  6. A Complete Guide to Return Values in Python for Beginners

    Return values are fundamental to creating useful and reusable functions in Python. They allow your functions to communicate results back to other parts of your program, making it possible …

  7. Python Return Values: Best Practices and Usage Guide

    Mar 18, 2025 · First, understand that the return statement sends values from a function back to the caller. Consider this simple example: return a + b. Here’s how it works: The add_numbers …

  8. Returning Values in Python Functions

    In programming, a function is like a recipe. Just as a recipe takes ingredients and produces a dish, a function takes inputs (arguments) and produces an output (return value). The return …

  9. Python Function Return Values | return Statement - apxml.com

    Just printing a result inside a function isn't always sufficient; often, you need to pass the computed value back. This is achieved using the return statement. The return statement serves two …

  10. Python return Statement - Explained with Examples - Python

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