Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Accessing elements from a Python Nested Dictionary

# welcome to softhunt.net
# Creating a Dictionary
Dictionary = {0: 'Softhunt', 1: '.net',
		2:{'i' : 'By', 'ii' : 'Ranjeet', 'iii' : 'Andani'}}
print('Dictionary', Dictionary)

# Accessing element using key
print(Dictionary[0])
print(Dictionary[2]['i'])
print(Dictionary[2]['ii'])
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Accessing #elements #Python #Nested #Dictionary
ADD COMMENT
Topic
Name
3+4 =