The comments are running willy-nilly, but at least in the pre-view mode it helps to click "Toggle Plain Text".
if wish == 1: #Menu option
word = input("Enter word: ")
description = input("Enter description: ")
print
print
tuplelist.append((word,description)) #tuplelist is originally
defined as simply []
main_dictuples(tuplelist) #Returns the function
for the main menu;
ideally updating tuplelist
with a new tuple
at the last position...
if wish == 2: #Menu option
word = input("Enter word to look up: ") #Shortened version,
but you get the idea
if word in tuplelist:
print "Yep"
else:
print "Nope"
Now, option 2 returns Nope regardless of wether the word you enter was entered into the list under option 1 before or not.
So what I'm trying to get to grips with is how to make python realise that the word entered is in the list. Or, to put it another way, to use the variable "word" under both 1 and 2 as a dictionary keyword.
Sheesh, I really have a long way to go...