def get_filename_and_extension(path):
    """
    Returns a filename and the file extension. The filename cna
    be either a simlpe filename or a full path.

    :param path:
    :return:
    """
    filename = path.split('.')[:-1]
    extension = path.split('.')[-1]
    return filename, extension
