## 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. # When I test out the code on various data sets (dictionaries similar to the example) it works but not for the task answer

The function should accept a dictionary arg in the format of {'teacher1':['courses']...etc and return a list of lists that have the first value as the name and second as the amount of courses Please See the 'stats' function

def stats(arg5): retValue=[] for key,value in arg5.items(): retValue.append([key,len(value)])

```return(retValue)
```
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(arg1):
return1=0
dictA=arg1
for key in dictA:
return1 +=1
continue
return(return1)

def num_courses(arg2):
return2=0
dictA=arg2
for key in dictA:
return2 += len(dictA[key])
continue
return(return2)

def courses(arg3):
return3=[]
dictA=arg3
for key in dictA:
return3.extend(dictA[key])
return(return3)

def most_courses(arg4):
return4=[]
courseLen=0
dictA=arg4
for key in dictA:
if len(dictA[key])>courseLen:
return4=key
courseLen=len(dictA[key])
else:
continue
return(return4)

def stats(arg5):
retValue=[]
for key,value in arg5.items():
retValue.append([key,len(value)])

return(retValue)
```