def is_valid_file(path):
    ''' Returns True if provided file exists and is a file, or False otherwise. '''
    return os.path.exists(path) and os.path.isfile(path)
def is_valid_file ( path ) : return os . path . exists ( path ) and os . path . isfile ( path )
Returns True if provided file exists and is a file, or False otherwise.