Jul-25-2020, 10:51 PM
I have a function to take theWords, a list of words or phrases, and make an html table with them. Works OK.
Sometimes, I forget to click the button "get the words", so the words list is empty. Nothing happens, no error.
I'd like to catch that with something like:
Sometimes, I forget to click the button "get the words", so the words list is empty. Nothing happens, no error.
I'd like to catch that with something like:
if len(theWords) == 0: echoMessage('You forgot the words Dummkopf!) exit()What is the best way to jump out of a function if a condition is not met?