Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion exercise/dictionary.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#Creating Dictionery
myword = {"centos": "Open source server distribution.",
"ubuntu": "Open source desktop distribution",
"redhat": "Propriatory OS.",
"arch": "Open Source desktop and client distribution."
}
#Printing all keys of dictionery
print(myword.keys())
print("Check Keys name from above line.")
print("Enter your choice name:", end='')
#take input from user to print element of dictionery.
tia1 = input()
print(myword[tia1])
#use of get functio to access element of dictionery.
print(myword.get(tia1,"No Such Key exist in dictionery"))
#print(myword[tia1])