About 4,850,000 results
Open links in new tab
  1. Return List from Function - Python - GeeksforGeeks

    Jul 23, 2025 · In Python, functions can return a wide variety of data types and we can return list too. Our task is to return a list from a Python function. We'll do this using different techniques—returning static …

  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. 12.5. Returning a value from a function — Foundations of Python

    For example, len takes a list or string as a parameter value and returns a number, the length of that list or string. range takes an integer as a parameter value and returns a list containing all the numbers …

  4. Python - Ways to find indices of value in list - GeeksforGeeks

    Jul 11, 2025 · In Python, it is common to locate the index of a particular value in a list. The built-in index() method can find the first occurrence of a value. However, there are scenarios where multiple …

  5. Random Numbers in Python - GeeksforGeeks

    Jul 26, 2024 · Python random.seed () function is used to save the state of a random function so that it can generate some random numbers in Python on multiple executions of the code on the same …

  6. Mastering Return Values in Python Functions

    Aug 26, 2024 · This tutorial dives deep into return values, a crucial concept for writing effective and reusable Python functions. Learn how they work, why they’re important, and see practical examples …

  7. How to Call a Specific Value in a List in Python - PyTutorial

    Oct 29, 2024 · Learn how to call a specific value in a Python list using indexing, slicing, and methods. Discover examples and tips for retrieving list elements effectively.

  8. Python | Extract Numbers from String - GeeksforGeeks

    Nov 10, 2025 · Given a string in Python, our task is to extract all the numbers present in it. Example: Input: "There are 2 apples for 4 persons" Output: [2, 4] The input sentence has 2 integer values: "2" …

  9. python - Return list of items in list greater than some value - Stack ...

    Aug 7, 2025 · Return list of items in list greater than some value Ask Question Asked 15 years, 3 months ago Modified 8 months ago

  10. Python Return Statement

    Feb 16, 2026 · Master the Python return statement with this expert guide. Learn to return single values, multiple objects, and functions with real-world US-based examples.