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 Teacher Stats

Questions on the 3rd part of this challenge: i'm executing a nested for loop to grab and append my list receiving an err

So I am working on the third part of the code challenge I am using a nested for loop to get access to the items within the values of the dictionary. and then append those items to my empty List and return that List when the for loops exit. Working in work spaces I was able to print the result. However when I try to return the value of the List I get an erro Bummer: Try again

#this 
ref ={'Andrew Chalkley': ['jQuery Basics', 'Node.js Basics'],
'Kenneth Love': ['Python Basics', 'Python Collections']}

def courses(ref):
    values = ref.values()
    List = []
    for val in values:
        for item in val:
            List.append(str(item))
    print(List)

courses(ref)
# result ['jQuery Basics', 'Node.js Basics', 'Python Basics', 'Python Collections']