Python function Description Content format error

Source: Internet
Author: User

def levltwo (levlonelist,levlonenum): "" "    entry levlonelist first-level city list    entry Levlonenum user selected city serial number    The Levltwolist returns a level two city list    "" "    if Int (levlonenum) <= len (levlonelist)-1:        print (" "--------------------- -----------    Welcome to the City Inquiry system!    ------------------------------------    %s city has the following areas:    b return    Q exit "" "% (Levlonelist[int (levlonenum)))        levltwoinfo = Citydata[levlonelist[int (levlonenum)]]        levltwolist = [] for        x in Levltwoinfo:            Levltwolist.append (x)        for i in Levltwolist:            print (Levltwolist.index (i), i)        return levltwolist

Function "" ".... "" "does not follow formatting to cause the runtime program to error

  File "d:/new Folder/day1/threedirectory/threedirectory.py", line    if int (levlonenum) <= len (levlonelist)-1:                                            ^indentationerror:unindent does not match no outer indentation level

Alignment of the function's comment content is not an error.

def levltwo (levlonelist,levlonenum): "" "    entry levlonelist first-level city list    entry Levlonenum user selected city serial number    Exit Levltwolist return to level two city list    "" "

It seems that Python's requirements for format are very strict.

Python function Description Content format error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.