1,230 results
Open links in new tab
  1. Returning Multiple Values in Python - GeeksforGeeks

    Mar 18, 2026 · In Python, a function can return more than one value at a time using commas. These values are usually returned as a …

  2. Python Return Multiple Values from a Function (5 Ways)

    Nov 13, 2026 · Return multiple values from a function in Python with tuples, dicts, NamedTuple, dataclasses and generators, plus …

  3. How can I return two values from a function in Python?

    If you want to return more than two values, consider using a named tuple. It will allow the caller of the function to access fields of the …

  4. Python Return Multiple Values: 4 Methods & Examples

    Learn 4 ways to return multiple values in Python: tuples, named tuples, dataclasses, and dicts. With code examples and a quick …

  5. What's the best way to return multiple values from a function?

    I'm still very new to Python and the only thing I can think of is to return a tuple with the boolean and modified string. Related question: …

  6. The Python return Statement: Usage and Best Practices

    Sep 28, 2020 · See how Python return values work, including multiple results, so you write clear, testable functions. Follow examples …

  7. Python: Return Multiple Values from a Function - datagy

    Oct 29, 2021 · Learn how to use Python to return multiple values from your functions, using tuples, lists, and dictionaries to …

  8. Python return statement - GeeksforGeeks

    Dec 20, 2025 · Explanation: return x, y sends two values together as a tuple a, b = get_vals () unpacks the returned values into …

  9. Get Multiple Values from a List in Python

    Oct 14, 2025 · Learn five easy Python methods to get multiple values from a list using slicing, unpacking, loops, and list …

  10. Python Return Multiple Values – How to Return a Tuple, List, or …

    July 20, 2020 / #data structures Python Return Multiple Values – How to Return a Tuple, List, or Dictionary By Amy Haddad You can …