摘要: 简介:它通过{}和:来代替传统%方式 1、使用位置参数 要点:从以下例子可以看出位置参数不受顺序约束,且可以为{},只要format里有相对应的参数值即可,参数索引从0开,传入位置参数列表可用*列表 2、使用关键字参数 要点:关键字参数值要对得上,可用字典当关键字参数传入值,字典前加**即可 3、填 阅读全文
posted @ 2019-05-02 17:17 乔儿 阅读(6128) 评论(0) 推荐(1) 编辑
摘要: url_rl = "https://www.yijiupi.com/v31/Product/ListProduct" payload = '{"currentPage":1,"data":{"sonCategoryId":"%s","categoryIds":["%s"],"saleModel":-1,"sort":0,"currentPage":1,"pageS... 阅读全文
posted @ 2019-05-02 17:08 乔儿 阅读(1121) 评论(0) 推荐(0) 编辑
摘要: #encoding:utf-8 import math #向上取整(进一) print("math.ceil---") print("math.ceil(2.3) => ", math.ceil(2.3)) print("math.ceil(2.6) => ", math.ceil(2.6)) #向下取整(舍一) print("\nmath.floor---") print("math.fl... 阅读全文
posted @ 2019-05-02 15:46 乔儿 阅读(473) 评论(0) 推荐(0) 编辑
摘要: 没有请求头headers时就会这样报错,例如: 阅读全文
posted @ 2019-05-02 09:58 乔儿 阅读(661) 评论(0) 推荐(0) 编辑