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()

 

posted @ 2015-11-07 16:45  Xiao|Deng  阅读(495)  评论(0编辑  收藏  举报