Myrmornis 19 hours ago

You should use a tuple there: it's a collection of fixed size where each slot has an identity. (There's a common confusion in Python circles that the main point of tuples is immutability; that's not so).

ghxst a day ago

Why would you do this over `return key, value` which produces a tuple? Just curious.

  • dgan a day ago

    Not the parent, but i return heterogeneous lists of the same length to the excel to be used by xlwings. The first row being the headers, but every row below is obviously heterogeneous

  • slightwinder 19 hours ago

    To quote the Zen of Python:

        Explicit is better than implicit.
        Readability counts.