Want to reduce steps of an operation with dictionaries
Ben Finney
bignose+hates-spam at benfinney.id.au
Tue Oct 24 21:14:22 EDT 2006
pretoriano_2001 at hotmail.com writes:
> I have next dictionaries:
> a={'a':0, 'b':1, 'c':2, 'd':3}
> b={'a':0, 'c':1, 'd':2, 'e':3}
> I want to put in a new dictionary named c all the keys that are in b
> and re-sequence the values.
They never had a sequence, so you can't "re-sequence" them.
You have not, perhaps, worked your way through the Python
tutorial. It's quite comprehensive and will give you a good grounding
in the basic concepts.
<URL:http://docs.python.org/tut/>
--
\ "I stayed up all night playing poker with tarot cards. I got a |
`\ full house and four people died." -- Steven Wright |
_o__) |
Ben Finney
More information about the Python-list
mailing list