11. Write a python program to test whether a specified file is exist.
The output is:
file: document.txt:
Expected Answer:
True
Sample Answer:
import os.path open('document.txt', 'w') print(os.path.isfile('document.txt'))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)