1
不知道如何解決這個問題?我知之甚少.format,和我使用:元組屬性? (Python)
printedxrows = [ ("[X]","[X]","[X]","[X]","[X]"," <- V: {} TOTAL: {}")
.format(row.count(0), sum(row))
for row in rows ]
我收到此錯誤:
for row in rows ]
AttributeError: 'tuple' object has no attribute 'format'
你們是不是要產生一個字符串的元組或與它周圍的括號字符串? – dawg