Suppose there is a function written in Python
def functionname() -> int:
Should the programmer must return the int
in this function? Or is it acceptable to return nothing but use print()
?
Should the programmer must return the same data type as the type hint?