摘要:
<?xml version="1.0" encoding="utf-8"?><class> <student> <name>张三</name> <age>23</age> <city>深圳</city> </student> <student> <name>李四</name> <age>25</ag 阅读全文
摘要:
yuangongs={}def show_menu(): print("*"*20+"员工管理系统"+"*"*20) print(1,"添加员工信息") print(2, "删除员工信息") print(3, "修改员工信息") print(4, "显示员工信息") print(5, "退出员工管理 阅读全文
摘要:
a="Time:20190822_111655_554 Start Cloud new case, Num=1, Input=/data/voice/20190725_035326_2_voice_in_dump.wav"#先用逗号进行切割,获取得到第二截的字符s=a.split(",")[1]#再 阅读全文
摘要:
f = open("1.xml", 'r+', encoding='utf-8')all_the_lines = f.readlines()#注意指针问题f.seek(0)#指针位置为开头f.truncate(0)#清空文件# print(f.tell())for line in all_the_l 阅读全文
摘要:
import xlwtimport csvnewfile=open("wu.csv","w",newline="")filewriter=csv.writer(newfile)#往csv里面写入3条数据list2={101:{"name":"999","sex":"nan"},1002:{"name 阅读全文
摘要:
#encoding:utf-8 import csv csv_file=csv.reader(open("d://wu.csv","r"))print(csv_file)for i in csv_file: print(i[0],i[1]) 阅读全文
摘要:
import csvimport xlrdimport xlwtdef handler_excel(filename=r'd:\\wu.xlsx'): # 打开文件 workbook = xlrd.open_workbook(filename)#打开文件放到变量 name= workbook.she 阅读全文
摘要:
tup=([2,3,4,22],[2,4,22],[44,55]) zidian={"a":"1","b":{"aa":"11","bb":"22"}}tup3=(("a","1"),["b",{"aa":"11","bb":"22"}])元组 for xxx in tup3: print(xxx[ 阅读全文