<reponame>CodedLadiesInnovateTech/-python-challenge-solutions<gh_stars>1-10
'''5. Write a Python program to check whether a file path is a file or a directory.'''

import os
path = "abc.txt"
if os.path.isdir(path):
    print('\nIt is a directory')
elif os.path.isfile(path):
    print('\nIt is a normal file')
else:
    print('It is a special file (socket, FIFO, device file)')
    


'''5. Write a Python program to check whether a file path is a file or a directory.'''

import os
path = "abc.txt"
if os.path.isdir(path):
    print('\nIt is a directory')
elif os.path.isfile(path):
    print('\nIt is a normal file')
else:
    print('It is a special file (socket, FIFO, device file)')
5. Write a Python program to check whether a file path is a file or a directory.