My Python assignment requires the following function header:
def choose(self, options:list[str]) -> str:
But when I try using this in a program, even if the body just returns simple text like return "string"
, then I get the error message:
def choose(self, options: list[str]) -> str:
TypeError: 'type' object is not subscriptable