Python 字典(数组)格式化写入文本文件或打印
# 字典格式
def write_format_object(obj: dict, tab_num=0, is_tab=1):
if is_tab:
data = ("\t" * tab_num)
else:
data = ''
data += "{\n"
length = len(obj)
for key, value in obj.items():
el_type = type(value)
len.
原创
2022-05-06 17:29:46 ·
1379 阅读 ·
0 评论