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:
What is the best way to jump out of a function if a condition is not met?
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:
1 2 3 |
if len (theWords) = = 0 : echoMessage('You forgot the words Dummkopf!) exit() |