1. 程式人生 > >python報錯

python報錯

bsp error: pan nbsp 字符 ring ted string log

1.ValueError: unsupported format character ‘D‘ (0x44) at index 16

string0 = "123456"
string = "string%s" %string0
上一句改成:string = "string%s".replace(%s,string0)

2.輸出內容到命令行,中文字符是亂碼

1>在輸出內容後面加上.decode(utf-8)

python報錯