About 1,830 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 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 code written …

  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

    The return keyword is to exit a function and return a value. Statements after the return line will not be executed: print("Hello, World!") Define a function using the keyword def. Read more about functions …

  5. 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 function the first …

  6. Python Return Values: Function Output Guide - PyTutorial

    2 days ago · Learn how Python functions return values, handle multiple outputs, and use None effectively to write cleaner, more predictable code.

  7. What Does Return Do in Python Functions?

    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.

  8. 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 methods, …

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

  10. Understanding the `return` Statement in Python - codegenes.net

    Nov 14, 2025 · In Python, the return statement is a fundamental concept that plays a crucial role in the behavior of functions. It allows a function to send data back to the part of the code that called it. This …