2020年6月16日

字符串格式化

摘要: 字符串格式化的两种方式:百分号格式、format格式 1、百分号格式 #打印字符串 msg="i am %s,my hobby is %s" %("alex","youxi") print(msg) #打印整数 msg1="name %s,age %d" %("land",28) print(msg 阅读全文

posted @ 2020-06-16 22:10 Yangyl_00 阅读(234) 评论(0) 推荐(0) 编辑

导航