摘要: 1,%s格式化使用的两种方式: 第一种:按照位置与%s一一对应,少一个不行,多一个也不行。 res = "my name is %s my age is %s" %('feizai','18') 第二种:以字典的形式传值,打破位置的限制。 res = "my name is %(name)s my 阅读全文
posted @ 2022-04-05 19:57 眼带笑意 阅读(435) 评论(0) 推荐(0)