Important Notice:

Course Content
Dictionary in Python (Chapter-9) M3-R5
About Lesson

Changing (updating) Element of Dictionary:-

   a={50:’Aman’, 51:’Raman’, 52:’Suman’}

print(a)                                     # {50: ‘Aman’, 51: ‘Raman’, 52: ‘Suman’}

a[52]=”Ankit”

print(a)                                    # {50: ‘Aman’, 51: ‘Raman’, 52: ‘Ankit’}

 

 

Changing (updating) Element of Dictionary:-

 a={50:’Aman’, 51:’Raman’, 52:’Suman’}

print(a)                                    # {50: ‘Aman’, 51: ‘Raman’, 52: ‘Suman’}

a[52]=”Ankit”

print(a)                                      # {50: ‘Aman’, 51: ‘Raman’, 52: ‘Ankit’}

error: Content is protected !!