Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> Python

Unexpected Indent ใน Python คืออะไร (ซ้ำ)

เนื้อหาเหมือน ID 1004108140

Python ต้องการ indentation consistent

ผิด

def a():
    print "foo"
     print "baz"

ถูก

def a():
    print "foo"
    print "baz"