2020年4月6日

python异常处理,草稿

摘要: import tracebackdef calc(a,b): res = a/b return resdef main(): money = input('输入多少钱:') months = input('还几个月:') try: res = calc(int(money),int(months)) 阅读全文

posted @ 2020-04-06 18:08 奥喵 阅读(133) 评论(0) 推荐(0) 编辑

python操作excel

摘要: 1、写import xlwt# book = xlwt.Workbook() #新建一个excel# sheet = book.add_sheet('sheet1') #添加一个sheet页# sheet.write(0,0,'姓名')# sheet.write(0,1,'性别')# sheet.w 阅读全文

posted @ 2020-04-06 16:31 奥喵 阅读(202) 评论(0) 推荐(0) 编辑

python网络编程(requests)

摘要: import json,requestsrequests比较好用,不要用urllib#发送get请求# url = 'http://api.nnzhp.cn/api/user/stu_info?stu_name=小黑马'# req = requests.get(url) #发送get请求# prin 阅读全文

posted @ 2020-04-06 15:41 奥喵 阅读(212) 评论(0) 推荐(0) 编辑

导航