Python自学:第二章 使用函数str( )避免类型错误

age = 23
message = "Happy " + str(age) + "rd Birthday"
print(message)

输出位

Happy 23rd Birthday

 

posted @ 2019-04-06 08:37  Johnson蚂蚁  阅读(420)  评论(0编辑  收藏  举报