I have referred to some posts related to this on Stack Overflow. However I did not really find a very convincing way of doing this.
How would I have a function to return True or False depending on whether a word (which is input to the function) contains 0 or 1(or more) stars.
I tried something like this:
def ANY_CHAR_IS_star(word):
return bool(re.match(r"^[*]?", word))
However this is return true for false cases as well. Not sure where am going wrong. A little weak on regex honestly