0
class Solution:
>         def runningSum(self, nums: List[int]) -> List[int]:

I'm trying to solve some questions on leetCode right now and I have never seen a function that uses symbols such as " -> " . So I understand what the first parameter "self" means but everything after that is just noodles in my head.

  • These are type hints.Check the documentation [here](https://www.python.org/dev/peps/pep-0484/). – mlang Nov 07 '20 at 10:41
  • this basically says that `nums` is a list of integers, and the function returns a List of integers. These are called type hints. The code will work regardless of whether you declare the type or not. – hiranyajaya Nov 07 '20 at 10:44

0 Answers0