Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Advanced Search
Search Results
Search Result
Collapse
Search Results:
1 result in 0.0014 seconds.
Keywords
Search in titles only
Members
Started posts only
Search
Tags
Search
insertion in dictionary
Sort By
Relevance
Title
Members
Date - started post
Date - last update
Replies
Reactions
Event Start
Trending
Order
Descending
Ascending
bharathpaul
started a topic
Inserting in multidimension dictionary.
in
Python
Mar 9 '10, 08:53 AM
Inserting in multidimension dictionary.
I am working with python 3.1.1 Below is my code and this works well.
Code:
dict={'paul':{'age':23,'hobby':'computer','like':'music'}} print (dict['paul']['hobby'])
But how to insert a new item in the above dictionary.
If i tried with, say
dict['anotheritem']['nested']='true' , it gives error...
Also help me in printing the elements using Loop
See more
|
Go to post
Last edited by
bvdet
;
Mar 9 '10, 12:17 PM
.
Reason:
Add code tags
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕