Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to add elements in a dictionary in python

# plz suscribe to my youtube channel -->
# https://www.youtube.com/channel/UC-sfqidn2fKZslHWnm5qe-A

#dictionary
programming = {
    "Bugs": "These are the places of code which dose not let your program run successfully"
    ,"Functions":"This is a block in which you put a peice of code"
    ,"Shell":"This is a place where the code is exicuted"
    }
print(programming["Bugs"])
print(programming["Shell"])
#Adding items to dictionary
#Firtly get the access to the dictionary
programming["Loops"] = "This is a action of doing something repeatedly"
print(programming["Loops"])
Source by www.journaldev.com #
 
PREVIOUS NEXT
Tagged: #add #elements #dictionary #python
ADD COMMENT
Topic
Name
9+6 =