So I have code, where it should choose at random whether to show the user the entry itself or the associated definition.
from random import *
def show_flashcard():
random_key = choice(list(glossary))
print('Define: ', random_key)
input('Press return to see the definition')
print(glossary[random_key])
glossary = {'word1':'definition1',
'word2':'definition2',
'word3':'definition3'}
It only shows the random keys, but not the values. How can i implement this in my code ?