1、JSON
import json
def json_basic():
data={
‘’ID’’:1
’’课程‘’:‘’python精讲‘’,
‘’机构‘’:‘’优品课堂‘’,
’‘单价’‘:98.00
’‘网址’‘:’‘http://cord.cn’’
}
print(‘原始数据’)外汇代理http://www.fx61.com/ib.html
print(data)
print(‘-‘*20)
json_str=json.dumps(data)
print(json_str)
print(‘-‘*20)
json_data=json.loads(json_str)
print(json_data)
def json_writer_file():
def json_read_file():
def json_type.diff():
if__name__=‘__main__’:
json.basic()
2、excel
import xlrd
def xl_read():
‘’’’’’excel读取’’’’’’
book=sled.open_workbook(‘product.xls’)
for sheet in book.sheets():
print(sheet.name)
def xl_read_data():
if __name__=‘__main__’:
xl_read_data()
|
|