IndentationError expected an indented block

后端 未结 5 1907
借酒劲吻你
借酒劲吻你 2020-12-05 18:30

Here is the code:

def myfirst_yoursecond(p,q):

a = p.find(" ")
b = q.find(" ")
str_p = p[0:a]
str_q = p[b+1:]

if str_p == str_q:
    res         


        
5条回答
  •  借酒劲吻你
    2020-12-05 19:32

    If you are using a mac and sublime text 3, this is what you do.

    Go to your /Packages/User/ and create a file called Python.sublime-settings.

    Typically /Packages/User is inside your ~/Library/Application Support/Sublime Text 3/Packages/User/Python.sublime-settings if you are using mac os x.

    Then you put this in the Python.sublime-settings.

    {
        "tab_size": 4,
        "translate_tabs_to_spaces": false
    }
    

    Credit goes to Mark Byer's answer, sublime text 3 docs and python style guide.

    This answer is mostly for readers who had the same issue and stumble upon this and are using sublime text 3 on Mac OS X.

提交回复
热议问题