structure in Python
Matt Gerrans
matt.gerrans at hp.com
Mon Oct 20 20:44:37 EDT 2003
Dora and Boots say: "Say map! Say map!"
>>> stuff = { 'A' : [1,5], 'B' : [6,7] }
>>> stuff['B'][0] += 6
>>> stuff
{'A': [1, 5], 'B': [12, 7]}
>>> stuff['C'] = [33,44]
>>> del stuff['B']
>>> print stuff["A"]
[1, 5]
- Matt
"Alberto Vera" wrote:
I have the next structure:
[key1,value1,value2]
How Can I make it using Python?
How Can I update the value of 6?
How Can I insert a key called "C" and its values?
How Can I delete a key called "B"?
How Can I search a key called "A"(parameter) and get its values?
More information about the Python-list
mailing list