I'm trying to make a program with a function that only accepts strings. How can I make a python function parameter always be a string and throw an error if it's not?
I'm looking for something like:
def foo(i: int):
return i
foo(5)
foo('oops')
Except this does not throw an error.