1. 程式人生 > >TypeError: not all arguments converted during string formatting

TypeError: not all arguments converted during string formatting

tin convert str 就是 ring erro 說明 mat uri

print ("So, you‘re 5r old, %r tall and %r heavy." % (age, height, weight))

print ("So, you‘re %r old, %r tall and %r heavy." % (age, height, weight))

說明前後%和後面的參數數量不對應.紅色就是錯誤的地方。

TypeError: not all arguments converted during string formatting