1

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?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Walker
  • 19
  • 3

0 Answers0