1、定义 open(filename[,mode[,buffering]]) 其中mode有: 2、读文件 1)读取整个文件 test=open('input.txt','r') print test.read()