摘要:def multi_row(test={}): if not test.get("name"): test["name"] = [] test.get("name").append("script boy") return test def once_row(test={}): """dict().
阅读全文
posted @ 2024-09-11 23:33
|
|
|
随笔分类 - python
摘要:def multi_row(test={}): if not test.get("name"): test["name"] = [] test.get("name").append("script boy") return test def once_row(test={}): """dict().
阅读全文
posted @ 2024-09-11 23:33
摘要:# encoding: utf-8import loggingERROR_NOT_FOUNDED_FILE = "error_not_founded_file"class GeneralError(Exception): def __init__(self, value, description):
阅读全文
posted @ 2022-08-26 18:05
摘要:python的推导式包括字典、数据、元组、集合推导式。 实现上,一重推导式介绍比较多,二重或者多重几乎没有。 以字典推导式为例,简单的介绍下实现方式: # @Time : 2022/6/20 17:56 # @Software: PyCharm # 1、一重## 普通方式 tmp_dict = {}
阅读全文
posted @ 2022-06-20 19:10
|
|