Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

PyAddBook

Language: Layout:
+ ] Show input
Absolute running time: 0.15 sec, cpu time: 0.02 sec, memory peak: 7 Mb, absolute service time: 0,22 sec 
edit mode |  history  | discussion
Creating Dictionary
{'name': 'xyz', 'address': {'house': '00', 'road': '#2', 'city': 'nul'}}
Add Item
{'contact': {'phone': '0###0', 'mail': '[email protected]'}, 'name': 'xyz', 'address': {'house': '00', 'road': '#2', 'city': 'nul'}}
Creating new nested dictionary using dict() constructor
{'origin': {'nationality': 'bbb', 'country': 'nnnn'}, 'name': 'efg'}
Merging two dictionaries
{'origin': {'nationality': 'bbb', 'country': 'nnnn'}, 'contact': {'phone': '0###0', 'mail': '[email protected]'}, 'name': 'efg', 'address': {'house': '00', 'road': '#2', 'city': 'nul'}}
Accessing values
efg
nul
#2
Deleting item
{'origin': {'nationality': 'bbb', 'country': 'nnnn'}, 'name': 'efg'}
Iterate through nested dictionary
('nationality:', 'bbb')
('country:', 'nnnn')
('name:', 'efg')

    
                
λ
.NET NoSQL database for rapid development