无法解决python中的缩进问题

时间:2019-05-10 10:27:18

标签: python

我是python的新手,但仍大量搜索该错误,但仍无法解决问题,但出现以下错误:IndentationError:unindent与任何外部缩进级别都不匹配

class Solution:
    def numDecodings(self,name):
        print(name)
        return self.helper(s)

    def helper(self,sentence):
        print(sentence)

if __name__ == "__main__":
   s=Solution()
   s.numDecodings('2263')

错误:

File "decode.py", line 21
    def helper(self,sentence):
                             ^
IndentationError: unindent does not match any outer indentation level

0 个答案:

没有答案