Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

is file a keywoard in python

#No, file is a builtin, not a keyword:
>>> import keyword
>>> keyword.iskeyword('file')
False
>>> import __builtin__
>>> hasattr(__builtin__, 'file')
True
It can be seen as an alias for open(), 
but it has been removed from Python 3, 
as the new io framework replaced it. 
Technically, it is the type of object returned by the open() function.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #file #keywoard #python
ADD COMMENT
Topic
Name
3+3 =