AttributeError: ‘str‘ object has no attribute ‘append‘
可以使用insert代替append
a=str(age,sex,job) a[2].insert(1,'age')
[Python]"no encoding declared
可添加编码 #coding=utf-8 或者以下声明 # -*- coding:utf-8 -*-
TypeError: not all arguments converted during string formatting
#原因是参数数量不匹配
print( """Personal info: name: %s age : %d sex : %s job : %s """ % (name,age,age,sex,job))
#解决办法
print( """Personal info: name: %s age : %d sex : %s job : %s """ % (name,age,age,sex,job))
标签:name,python,age,coding,sex,Personal,job,集中营,Bug From: https://www.cnblogs.com/sunnywf/p/16786582.html