#Python dictionary is an unordered collection of items.
#dictionary has a key: value pair.
#Dictionary is enclosed in curly brackets{}
#Dictionaries are optimized to retrieve values when the key is known.
# Creating a Dictionary
# Dict={}
# print(Dict)
# print(type(Dict))
# Creating a Dictionary with dict() method
# Dict = dict({1: 'Python', 2: 'C++', 3:'JAVA'})
# print(Dict)
# Dict = {1: 'python', 2: 'C++', 3: 'Java'}
# print(Dict)
# accesing keys and values from a Dictionary
# print(Dict.keys())
# print(Dict.values())
# Print(Dict.items)
# accesing a element from a Dictionary
# print(Dict[2])
# print(Dict.get(3))
# Appending values in a dictionary
# Dict = {1: 'python', 2: 'C++', 3: 'Java'}
# Dict[4]='dotnet'
# print(Dict)
# Creating a Dictionary with Mixed keys
# Dict = {'Name': 'Python', 1: [1, 2, 3, 4]}
# print(Dict)
# Adding elements one at a time
#Dict={}
#Dict[0] = 'JAVA'
#Dict[2] = 'Kotlin'
#Dict[3] = 1
#print(Dict)
# Adding set of values
# to a single Key
# Dict={}
# Dict['Value_set'] = 2, 3, 4
# print(Dict)
# Updating existing Key's Value
# Dict = dict({1: 'Python', 2: 'C++', 3:'JAVA'})
# Dict[2] = 'Swift'
# print(Dict)
# accesing a element from a Dictionary
#Dict = dict({1: 'Python', 2: 'C++', 3:'JAVA'})
#print(Dict[1])
#print(Dict.get(2))
# Deleting a Key value
# using pop() method
# Dict = dict({1: 'Python', 2: 'C++', 3:'JAVA'})
# Dict.pop(2)
# print(Dict)
# using del command
# Dict = dict({1: 'Python', 2: 'C++', 3:'JAVA'})
# print(Dict)
# del Dict[2]
# print(Dict)
# Deleting entire Dictionary
#Dict = dict({1: 'Python', 2: 'C++', 3:'JAVA'})
#Dict.clear()
#print(Dict)
# membership operator 'in' 'not in'
# Dict = dict({1: 'Python', 2: 'C++', 3:'JAVA'})
# print(1 in Dict)
# print(4 not in Dict)
# Dict = {1: 'python', 2: 'C++', 3: 'Java'}
# for x in Dict:
# print(x)
# for x in Dict:
# print(Dict[x])
# for x in Dict.values():
# print(x)
# for x, y in Dict.items():
# print(x, y)