str.startswith allows you to pass a tuple of strings to check if the string starts with any of them.
if mystr.startswith((']', ')', '}')):
return FalseToday I Learned
str.startswith allows you to pass a tuple of strings to check if the string starts with any of them.
if mystr.startswith((']', ')', '}')):
return False