我收到此错误:
TypeError:%不支持的操作数类型:'NoneType'和'tuple'
我需要更改以解决此问题?
string_1 = "Sean";
string_2 = "beginner programmer";
print("Hi my name is %s, I\'m a %s.") % (string_1,string_2);
答案 0 :(得分:4)
print
返回None
,您必须在打印之前格式化字符串
print("Hi my name is %s, I\'m a %s." % (string_1, string_2))