When I create a function, I often specify the data types of its arguments, for example:
def my_func(name: str, surname: str) -> str:
full_name = name + surname
return full_name
but if an argument of a function is another function, what is its data type?
I tried to do this:
def my_func_2(func: function) -> str:
return func()
but I get
NameError: name function is not defined