读txt文件 python常用的读取文件函数有三种read().readline().readlines() read() #一次性读取文本中全部的内容,以字符串的形式返回结果 with open("test.txt", "r") as f: #打开文件 data = f.read() #读取文件 print(data) readline() #只读取文本第一行的内容,以字符串的形式返回结果 with open("test.txt", "
在菜单Debug->Open Configurations,打开launch.json,新增如下粉红色字符内容: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 &quo