Type Hints
"""
The type descriptions are optional but it makes it
easier for other developers to read your code and
understand the types that you're working with
"""
name: str = "Marvelous"
number: int = 10
# using types to descript the parameter types and the function return type
def say_hi(name: str) -> str:
return f'Hi {name}'
greeting = say_hi('Emanuella')
print(greeting)Last updated