About 18,800,000 results
Open links in new tab
  1. Python type hints for function returning multiple return values

    Sep 25, 2019 · Actually, a Python function never returns "multiple values". What you are returning here is a tuple.

  2. python - What is a tuple useful for? - Stack Overflow

    Sep 9, 2014 · 1 A tuple is useful for storing multiple values.. As you note a tuple is just like a list that is immutable - e.g. once created you cannot add/remove/swap elements. One benefit of …

  3. How does tuple comparison work in Python? - Stack Overflow

    Tuples are compared position by position: the first item of the first tuple is compared to the first item of the second tuple; if they are not equal (i.e. the first is greater or smaller than the …

  4. Returning multiple values from a C++ function - Stack Overflow

    Aug 19, 2015 · F.21: To return multiple “out” values, prefer returning a struct or tuple Reason A return value is self-documenting as an “output-only” value. Note that C++ does have multiple …

  5. c# - How to name tuple properties? - Stack Overflow

    How and "could be" organized return from the method which returns tuple type with the name of parameters, as an example private static Tuple<string, string> methodTuple() { return new …

  6. What's the difference between lists and tuples? - Stack Overflow

    Mar 9, 2009 · What are the differences between lists and tuples, and what are their respective advantages and disadvantages?

  7. Create a Tuple in a Linq Select - Stack Overflow

    Nov 5, 2015 · .Select(c => new Tuple<string, byte>(c.Id, c.Flag)) .ToList(); This method lets you work with Linq to Object instead Linq to Entities, so after call it,you can project the result of …

  8. types - What are "named tuples" in Python? - Stack Overflow

    Jun 4, 2010 · Named tuple instances can be referenced using object-like variable dereferencing or the standard tuple syntax. They can be used similarly to struct or other common record …

  9. AttributeError: 'tuple' object has no attribute - Stack Overflow

    Jun 25, 2013 · When multiple values are returned from a function as comma-separated, they will be returned as a tuple. So obj here will be a tuple with values (s1, s2, s3, s4).

  10. Making a Tuple in C - Stack Overflow

    Mar 29, 2014 · That's what C structures are for. For example, the following structure is a tuple which binds a string (up to twenty characters long) to an integer value: typedef struct { char …