Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

Dictionary is used to contain data using key=>value pair .Key is used to provide unique identity and value is used to provide storage.

dictionary always will be declared by { }

student = {'rno':1001,'sname':'manish kumar','branch':'cs'}

here rno, same and branch is the key of a dictionary object.

the dictionary is immutable object means we can change the value of dictionary using the key.

student = {'rno':1001,'sname':'manish kumar','branch':'cs','fees':15000}
for k in student:
    print("key is "+k+" value is "+str(student[k]))

#del student['sname']



Post a Comment

POST Answer of Questions and ASK to Doubt

Previous Post Next Post