I am trying to do a dictionary database, like actual dictionary. User input key word and meaning and program saves it in database. Like input word: rain , input meaning of the word: water droplets falling from the clouds then program makes it a dictionary. So far I can manage do this but it doesn't work the way I want.
class Mydictionary:
def __init__(self):
self.key=input("Please input word: ")
self.value=input("Please input meaning of the word: ")
def mydictionary(self):
self.dic={self.key:self.value}
Mydic=Mydictionary()
Mydic.mydictionary()
It works for only one time. I want to save keywords and values as much as I want. I want to create a dictionary database.
