这是我的代码:
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