print("four: {}".format() four[0][5] == 'n' and four[0][0] == "P" and four[2][1] == "u" ) This gives a syntax error. Changing it to this: print("four: {}".format( four[0][5] == 'n' and four[0][0] == "P" and four[2][1] == "u" )) fixes the issue.