## 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.

# Teachers

For challenge 5 I have been asked to create a function called stats which crates a list of lists each containing the teachers and the number of courses they teach, my function seems to work in workspaces doing exactly as asked but in the challenge I get the message "could not find 'stats'" Have I made a stupid error here? Thank you in advance for any help

teachers.py
```# The dictionary will look something like:
# {'Andrew Chalkley': ['jQuery Basics', 'Node.js Basics'],
#  'Kenneth Love': ['Python Basics', 'Python Collections']}
#
# Each key will be a Teacher and the value will be a list of courses.
#
# Your code goes below here.
def num_teachers(arg):
return(len(arg))

def num_courses(arg):
x = 0
for course in arg:
x += len(arg[course])
return(x)

def courses(arg):
list_ = []
for value in arg.values():
list_ += value
return(list_)

def most_courses(arg):
list_nums = []
list_keys = []

for key in arg:
list_nums.append(len(arg[key]))
list_keys.append(key)

return(list_keys[(list_nums.index(max(list_nums)))])

def stats(arg):
stats_list = []

for key in dict_:
stats_list.append([key]+[len(arg[key])])

return(stats_list)
```