About 5,490,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

    In general, a function takes arguments (if any), performs some operations, and returns a value (or object). The value that a function returns to the caller is generally known as the function’s …

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

    The point of functions in general is to take in inputs and return something. The return statement is used when a function is ready to return a value to its caller. For example, here's a function …

  4. Python Functions - Python Guides

    Learn about Functions in Python: Create reusable blocks of code using the `def` keyword, pass arguments, return values, and organize your logic efficiently. ... Functions can return values …

  5. Exploring Function Arguments and Return Values in Python: A ...

    In Python, functions are not only a means of encapsulating code but also a powerful tool for handling data through arguments and return values. Understanding how to work with function …

  6. Python Function Return Values: A Comprehensive Guide

    Feb 16, 2025 · Fundamental Concepts of Function Return Values in Python. What is a Return Value? Why are Return Values Important? Usage Methods of Function Return Values. …

  7. Passing arguments and returning values from functions - Python

    Mar 6, 2023 · To return a value from a function in Python, you use the “return” keyword. For example: return number * number. In this example, we’ve defined a function called “square” …

  8. Exploring Function Parameters and Return Values in Python

    Sep 2, 2023 · Return values are what functions produce as output. In Python, you can return one or more values using the return statement. A function can have multiple return statements, but …

  9. PARAMETERS AND RETURN VALUES - Geeks with geeks

    In Python functions, parameters and return values play a crucial role in passing information to and from functions, respectively. Parameters are placeholders for values that are passed into the …

  10. Mastering Return Values in Python Functions

    Aug 26, 2024 · Functions are like reusable mini-programs within your Python code. They take input (called arguments), process that input, and often produce an output called a return value. …

  11. Some results have been removed
Refresh