def filter_dict_with_list(dictionary, key_list):
    """ Filter dictionary to keep keys from given list
    
        Args:
            dictionary (dict): dictionary to filter
            key_list (list): keys to keep in filtered dictionary
        Returns:
            dictionary (dict): the filtered dictionary with keys from input list
            
    """
    #Generate list of unwanted keys
    unwanted = (set(dictionary.keys()) - set(key_list))
    
    #Delete keys from dictionary
    for unwanted_key in unwanted: del dictionary[unwanted_key]
    
    return dictionary