Improper indentation of Python comments results in an indentation error: unexpected indent

Why can’t you stop buying 618?From the technical dimension to explore>>>

def test():
    i=0
'''
aaaaaa
'''
    while i < 5:
    '''
    bbbbbb
    '''        
        print(i)
        i+=1
        
if __name__ == '__main__':
    test()

As mentioned above, improper indentation of Python comments can also lead to an indentation error: unexpected indent. Modify the abbreviation of the note as follows

def test():
    i=0
    '''
    aaaaaa
    '''
    while i < 5:
        '''
        bbbbbb
        '''        
        print(i)
        i+=1
        
if __name__ == '__main__':
    test()

Similar Posts: