随笔分类 -  python

摘要:python 虚拟环境 创建一个虚拟环境 python3 -m venv /path/to/new/virtual/environment 使用虚拟环境 source ./venv_name/bin/activate 阅读全文
posted @ 2021-04-20 23:32 linux_txl 阅读(77) 评论(0) 推荐(0)
摘要:1. 按行读取文件 def readNode(filename): resultList = [] with open(filename, 'r') as f: while True: line = f.readline() # string if not line: break if line[0 阅读全文
posted @ 2021-04-16 17:41 linux_txl 阅读(248) 评论(0) 推荐(0)