when we define a python function in a Class, the self is necessary. But self isn't a key in python,so you can change self to any name you want.
So the first parameter means one instance that Class have created.
Can u understand? If not, write to me (email@example.com)
Why we need add self when we define a python function?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.