I'm trying to make a script to both teach my friend what little Python knowledge I have, and to refresh my own memory. I just started and it isn't finished at all either, but when I test run it, nothing happens. How do I run functions?
Here is my current code so far:
def mainmenu():
choice = {
'print',
'comments',
'if',
'else',
'and',
'or',
'elif',
'input',
'variables',
'strings',
'def',
'class',
'modules',
}
print("What would you like to learn about?")
for statement in choice():
print("- Type {} to learn about {}".format(statement))
pclass = input(">>>")
if pclass in choice():
return choice[pclass]()
else:
print("Invalid Choice")
Also in my for statement in choice I'm trying to make it repeat the print thing for every string in the set; I'm aware statement probably isn't even in the spectrum of what I need to type for it to do that. Any idea on what I should replace that with?