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

    May 2, 2023 · One alternative approach for returning multiple values from a function in Python is to use the yield keyword in a generator function. A generator function is a special type of …

  2. How to return more than one value from a function in Python?

    You separate the values you want to return by commas: # you code. return first_name, last_name. The commas indicate it's a tuple, so you could wrap your values by parentheses: …

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

    Feb 11, 2025 · Python provides several ways to return multiple values from a function. We will explore the most common methods, including returning tuples, lists, dictionaries, and using the …

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

    Jul 20, 2020 · Data structures in Python are used to store collections of data, which can be returned from functions. In this article, we’ll explore how to return multiple values from these …

  5. Python function Return Multiple Values [SOLVED] - GoLinuxCloud

    Jan 9, 2024 · Python allows you to return multiple values by separating return values with commas. When multiple values are returned this way, they are actually packed into a single …

  6. Returning Multiple Values in Python - CodeRivers

    Apr 10, 2025 · In many programming scenarios, it's useful to return more than one value from a function. Python provides several elegant ways to achieve this. This blog post will explore the …

  7. Python return Multiple Values - Embedded Inventor

    Jan 30, 2022 · In this article let us learn how to return more than one value from functions in Python. As programmers, we often come across situations where we need to return multiple …

  8. Python Program to Return Multiple Values From a Function

    In this example, you will learn to return multiple values from a function.

  9. Python: Return Multiple Results from a Function (3 Ways)

    Jul 10, 2023 · This concise, example-based article will walk you through 3 common approaches for returning multiple results from a function in Python. Without any further ado, let’s get …

  10. Multiple return - Python Tutorial

    In the most simple case you can return a single variable: Call the function with complexfunction (2,3) and its output can be used or saved. But what if you have multiple variables in a function …

Refresh