def flowers_dict(filename):
    """
    This function opens the flowers.txt, reads every line in it, and saves it as a dictionary.
    
    """
    flowers = {} #initialize the flowers' dictionary
    with open(filename) as f: # open the text file as f.
        for line in f: # reads every line in text file.
            letter = line.split(": ")[0].lower() # splits the line by ":" and takes the first index i.e letter in lower case
            flower = line.split(": ")[1] # splits the line by ":" and takes the second index i.e flower
            #print(flower)
            flowers[letter] = flower # enters the letter and flower as value pairs in the flowers' dictionary.
    return flowers