Two variable dictionary comprehension
Ben Finney
ben+python at benfinney.id.au
Sun Apr 2 22:41:18 EDT 2017
"Deborah Swanson" <python at deborahswanson.net> writes:
> Chris Angelico wrote, on April 02, 2017 6:37 PM
> >
> > On Mon, Apr 3, 2017 at 11:26 AM, Deborah Swanson
> > > Maybe I'm having another "dumb day" […]
>
> Well, wouldncha know it, I never tried using a colon. That's what I
> get for just trying to guess.
Yes, guessing *is* dumb when the reference documentation is available
<URL:https://docs.python.org/3/reference/expressions.html#displays-for-lists-sets-and-dictionaries>.
I was sure you'd have been reading the manual before guessing, but I'll
know better in future :-)
--
\ “A computer once beat me at chess, but it was no match for me |
`\ at kick boxing.” —Emo Philips |
_o__) |
Ben Finney
More information about the Python-list
mailing list