I'm trying to understand gradual typing and I came across the example below
def sum(num1: int, num2: int) -> int:
return num1 + num2
print(sum(2, 3))
print(sum(1, 'Geeks'))
what does the "->" do and why is it there?
I'm trying to understand gradual typing and I came across the example below
def sum(num1: int, num2: int) -> int:
return num1 + num2
print(sum(2, 3))
print(sum(1, 'Geeks'))
what does the "->" do and why is it there?