About 1,440,000 results
Open links in new tab
  1. Returning Multiple Values in Python - GeeksforGeeks

    Jul 1, 2025 · In Python, a function can return more than one value at a time using commas. These values are usually returned as a tuple. This is useful when a function needs to give back …

  2. 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 returned value by name, which is more readable.

  3. How to Return Multiple Values from a Function in Python?

    Feb 11, 2025 · Learn how to return multiple values from a function in Python using tuples, lists, dictionaries, and `dataclass`. This step-by-step guide includes examples.

  4. How to Return Multiple Values from a Function in Python

    Apr 23, 2025 · This article explains how to return multiple values from a function in Python. For an introduction to the basics of functions in Python, refer to the following article. In Python, you …

  5. Return Multiple Values in Python Functions - milddev.com

    Jul 27, 2025 · Learn how to return and handle multiple values in Python functions using tuples, lists, namedtuples, dataclasses, generators, and best practices.

  6. Returning Multiple Values in Python: A Comprehensive Guide

    Nov 14, 2025 · Python provides several ways to return multiple values, each with its own advantages and use - cases. This blog will explore these methods in detail, covering …

  7. Python Function Returning Multiple Values: A Comprehensive …

    Apr 5, 2025 · This feature can significantly simplify code, making it more readable and efficient in various scenarios. In this blog post, we will explore the concepts, usage methods, common …

  8. Python Function Return Values: Best Practices & Solutions

    Jul 25, 2025 · When designing Python functions, a common challenge arises: how to effectively return multiple pieces of information. While a function can only directly return one object, …

  9. How to return multiple results from function - LabEx

    Explore powerful Python techniques for returning multiple values from functions, including tuples, lists, dictionaries, and advanced unpacking strategies for efficient code design.

  10. Python Return Multiple Values – How To Return A Tuple, List, …

    Sep 3, 2024 · Python provides built-in data structures like tuples, lists, and dictionaries to enable returning multiple values with ease. In this comprehensive guide, you‘ll unlock expert …