Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Collections (2016, retired 2019) Dictionaries String Formatting with Dictionaries

Packing and Unpacking Dictionaries Challenge

I have tried this challenge for a few days and I keep getting the same error message - "Couldn't import favorite_food"... I've looked at other questions and responses but nothing is working. Does anybody have an idea?

string_factory.py
template = "Hi, I'm {name} and I love to eat {food}!"

def string_factory(list_of_dicts):
    new_list = []
    for value in list_of_dicts:
        list_of_str.append(template.format(**value))
    return new_list