type hints python function code example
Example: python type hints
def no_type_hint(arg):
print(arg) # arg can be anything
def with_type_hint(arg: str):
print(arg) # arg must be a string or a subtype of string
def no_type_hint(arg):
print(arg) # arg can be anything
def with_type_hint(arg: str):
print(arg) # arg must be a string or a subtype of string