About 18,700,000 results
Open links in new tab
  1. Python return statement - GeeksforGeeks

    Dec 10, 2024 · Python allows you to return multiple values from a function by returning them as a tuple: Example: In this example, the fun () function returns two values: name and age. The …

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

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

    The natural, simple, direct, explicit way to get information back from a function is to return it. Broadly speaking, the purpose of a function is to compute a value, and return signifies "this is …

  4. python - How do I write a function that returns another function ...

    In Python, I'd like to write a function make_cylinder_volume(r) which returns another function. That returned function should be callable with a parameter h , and return the volume of a …

  5. Python Functions - W3Schools

    To let a function return a value, use the return statement: function definitions cannot be empty, but if you for some reason have a function definition with no content, put in the pass statement to …

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

    The return statement causes your function to exit and hand back a value to its caller. The point of functions in general is to take in inputs and return something. The return statement is used …

  7. What is Python Return Statement? - Python Guides

    Jan 8, 2025 · In this tutorial, I will explain what is Python return statement. As a Python developer working on a project for one of my clients, I often came across a scenario while working on …

  8. Python Function Return Value - W3Schools

    To let a function return a value, use the return statement: Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, …

  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 Function [With Examples] - Python Guides

    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. Then, you …

Refresh