摘要:
#统计字符个数方法 def count_char(char,string): count=0 for c in string: if c==char: count+=1 return count char='l' string='hello world' count =count_char(char 阅读全文
摘要:
import json #导入JSON模块 with open('data.json',encoding='utf-8') as json_file: #读取JSON文件 py_obj=json.load(json_file) #JSON文件读取到字典 with open('data1.json', 阅读全文