[Study notes] Python error can only concatenate str (not "int") to str

Error content: 
CAN only CONCATENATE str (not "int") to str Error code: 

print("jianxieshi"+ c+ ".")

wrong reason:

print command within quotation marks should all strings instead of variables

correct  

print("jianxieshi"+ str(c)+ ".")

 

Guess you like

Origin www.cnblogs.com/programmingnoob/p/11184548.html