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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Jinman Kim](https://uploads.teamtreehouse.com/production/profile-photos/10206982/micro_13321804_1053668708042674_3096799598260096589_n.jpg)
Jinman Kim
5,586 PointsCorrect output but incorrect answer
I am not sure why this answer is not correct. I have submitted support as I thought it was a bug but they say other people was able to pass the test so I might be missing something
def favorite_food(name, food):
print ("Hi, I'm {} and I love to eat {}!".format(name,food))
favorite_food(**{"name":"Jin", "food":"Bacon"})
1 Answer
![Cheo R](https://secure.gravatar.com/avatar/f58173f5f2634ff4a5874d404908293a?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Cheo R
37,150 PointsKey part is:
Your function should unpack that dictionary
Remember, that using curly braces with strings, you can refer to your variable substitutions by name and use them in any order you want.
"Hi, I'm {name} and I love to eat {food}!".format()
And you can use double asterisks to unpack dictionaries (keyword arguments).
def unpack(dictionary):
return "{I} {am} {num} {a} {dictionary} {num}".format(**dictionary)
print(unpack({'I': 'yo', 'am': 'soy', 'a': 'un', 'dictionary': 'dictionario', 'num': 5}))
# yo soy 5 un dictionario 5
Jinman Kim
5,586 PointsJinman Kim
5,586 PointsAh I see more clearly how unpacking is done now. Thanks a lot!