def allowed_file(filename, extensions):
    """
    chceck if file extension is in allowed extensions
    :param filename: name of file
    :param extensions: allowed files extensions
    :return: True if extension is correct else False
    """
    return '.' in filename and filename.rsplit('.', 1)[1].lower() in extensions