2019年2月25日

Python中使用%还是format来格式化字符串?

摘要: Python中应该使用%还是format来格式化字符串? %还是format Python中格式化字符串目前有两种阵营:%和format,我们应该选择哪种呢? 自从Python2.6引入了format这个格式化字符串的方法之后,我认为%还是format这根本就不算个问题。不信你往下看。 # 定义一个 阅读全文

posted @ 2019-02-25 15:21 cai128118* 阅读(160) 评论(0) 推荐(0) 编辑

导航