Coding and Decoding in Python
John Gordon
gordon at panix.com
Thu Mar 17 11:44:38 EDT 2011
In <2f4a08df-55ea-4a4e-9cc0-24e6b9f81435 at f15g2000pro.googlegroups.com> Wanderer <wanderer at dialup4less.com> writes:
> But when the program returns the value I can't get the key.
What happens when two keys have the same value? How would you know which
key to return?
In your sample code all the values are different, but surely that won't
always be the case with real data.
--
John Gordon A is for Amy, who fell down the stairs
gordon at panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
More information about the Python-list
mailing list