0

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
Ansar Al
  • 149
  • 9

0 Answers0