![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Python练习题
Python练习题
z千鑫
我叫z.千鑫(Codemoss、能用AI合伙人),我没有那么多的头衔。我只想留点东西在人间。
展开
-
python--文件处理-实现实时log记录
#!/usr/bin/python3 # -*- coding: utf-8 -*- # @Date : 2021/5/26 # @Name : ZhouZongXin """ 在一个文件中不间断写下如下内容 1. 2020-01-01 14:15:16 2. 2020-01-01 14:15:18 3. 2020-01-01 14:15:20 要求: 每个时间占一行,每隔2秒写入一行 当程序终止以后下次启动要求需要衔接继续写 每写一行都要在文件中显示 """ import os import原创 2021-05-26 19:58:42 · 551 阅读 · 0 评论 -
python--Excel-通过excel获取对应的uid和金额,进行充值
本文内容:记载个人学习笔记,如有不对请多包含!!! #!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2020/9/17 # @Name : zhouZX # @Desc : """ # uid money # 882735480 10 # 882735429 20 通过excel获取对应的uid和金额,进行充值 """ import xlrd import json import requests def tw_test_a原创 2020-09-17 21:16:15 · 346 阅读 · 0 评论 -
python--文件读取-根据输入的单词,打印对应的单词解释
""" 读取dict.txt---文件如下 使用input输入一个单词,打印出这个单词的解释,如果没有这个单词则打印"没有找到该单词" 提示: 每个单词占一行 单词与解释之间有空格,去掉空格 单词按照从小到大排列 """ import os PAth = os.path.dirname(__file__) file = os.path.join(PAth, "dict.txt") query = str(input("请输出查询的单词:")) f = open(file, "r") for line原创 2021-05-25 13:05:25 · 347 阅读 · 0 评论