python之函数用法file()

# -*- coding: utf-8 -*-
#python 27
#xiaodeng
#python之函数用法file()



#file()
#说明:file()内建函数它的功能等于open(),但是可以看出,他是个文件工厂(生成文件对象),dict()生成字典对象
#包含与被包含的关系
'''
file(...)
    file(name[, mode[, buffering]])#buffering是缓冲相关的可选参数
    
    Return the binary representation of an integer or long integer.
'''

html=file('test.txt','r')
print html.read()
原文地址:https://www.cnblogs.com/dengyg200891/p/4945651.html