0
if file is not present whether it will be created??
in open function
2 ответов
+ 1
If you want to know If the file exists, you can do the following:
try:
open(filename, 'r')
except:
do something
finally:
do something else
+ 1
It will be created only in write mode