Scope of dictionaries vs variables for def in a python class

后端 未结 0 327
南笙
南笙 2021-01-27 12:51

When a dictionary is defined and used within the definition it works as shown below.

class Solution:
    def maxDepth(self, root):
        mcnt = {}
        mcnt[         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题