摘要:
3.8 """ 新特性1:海象运算符 """ a = [1, 2, 3, 4, 5, ] if (n := len(a) )> 5: print(f"List len is too long ({n} elements, expected <= 10)") else: print(f"List le 阅读全文
摘要:
JSON schema 基础 重点关键字: type 取值: 在线校验地址: https://www.jsonschemavalidator.net/ 校验值的类型 json: { "success": true, "code": 10000, "message": "操作成功", "data": 阅读全文
摘要:
作用类似于Java的三元运算符 IF 后为真: ```python a = True c = 4 if a else 3 print(c) # out: 4 ``` IF 后为假: ```python a = False c = 4 if a else 3 print(c) # out: 3 ``` 阅读全文