Construct a python function that sorts a list of tuples containing the names of the keys and values of a dictionary.
dictionary = {'a': 4, 'b': 2, 'c': 3, 'd': 1}
def sort_dictionary(dictionary):
    return sorted(dictionary.items(), key=lambda x: x[1])