About 1,170,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. How do I get ("return") a result (output) from a function ...

    Broadly speaking, the purpose of a function is to compute a value, and return signifies "this is the value we computed; we are done here". The main trick here is that return returns a value, not …

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

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

  5. Define and Call Functions in Python (def, return) - nkmk note

    Aug 19, 2023 · This article provides a comprehensive guide to defining and calling (executing) functions in Python.

  6. What Does Return Do in Python Functions? - pythongeeks.net

    Oct 26, 2025 · Discover what return means in Python, how to use return in functions, and the difference between def and return in coding examples.

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