這裏是我的代碼:的Python /如果語法錯誤
for i in tuples:
if i[0] == "U_shape":
pieces.append(U_shape(i[1], boardLength, i[2])
if i[0] == "I_shape":
pieces.append(I_shape(i[1], i[2])
if i[0] == "L_shape":
pieces.append(L_shape(i[1], boardLength, i[2])
if i[0] == "T_shape":
pieces.append(T_shape(i[1], boardLength, i[2])
if i[0] == "X_shape":
pieces.append(X_shape(i[1], boardLength, i[2])
這裏的錯誤:
if i[0] == "I_shape":
^
SyntaxError: invalid syntax