is file a keywoard in python

Solutions on MaxInterview for is file a keywoard in python by the best coders in the world

showing results for - "is file a keywoard in python"
Amos
11 Mar 2019
1#No, file is a builtin, not a keyword:
2>>> import keyword
3>>> keyword.iskeyword('file')
4False
5>>> import __builtin__
6>>> hasattr(__builtin__, 'file')
7True
8It can be seen as an alias for open(), 
9but it has been removed from Python 3, 
10as the new io framework replaced it. 
11Technically, it is the type of object returned by the open() function.
12
similar questions
queries leading to this page
is file a keywoard in python