Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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']