This structure is actually particular to Leetcode. After self the following things are happening:
parameter named heights is being passed to the method.
List[int] - This mean built-in object is List. And list contains integer elements.
-> int - This means the method will return an integer.
In the python code that we normally write. We don't usually use this format. Hence, this might be appearing unusual. This is just another way of passing the parameters.
You can read more about a library named mypy in python. To find more examples.
Can you please explain me the function line...being the absolute python beginner...I can't understand the thing after self keyword.
This structure is actually particular to Leetcode. After self the following things are happening:
In the python code that we normally write. We don't usually use this format. Hence, this might be appearing unusual. This is just another way of passing the parameters.
You can read more about a library named mypy in python. To find more examples.
Thanks a lot...❤