Professional Documents
Culture Documents
Programming
Programming
5}
print(x.items())
OUTPUT :
>> dict_items([('Name', 'Ali'), ('Age', 33), ('Height', 1.5)])
3. x = {5: 6, 7 : 8 , 9: 10}
print(x.keys())
OUTPUT :
>> dict_keys([5, 7, 9])
4. x = {“A” : “B”, 1 : 2 , “C” : 4}
for key in x:
print(key)
OUTPUT :
>> A
1
C
5. y = {“Name” : “Ali”, “Age” : 33 , “Height” : 1.5}
for t, r in y.items():
print(t, r)
OUTPUT :
>> Name Ali
Age 33
Height 1.5
6 -8 Create a program that will updates the height in a dictionary value to 1.9
9 -10 Create a program that will clear the key and value in a given dictionaries below