_:ncb22879575b54c9ab338b0edc94b37d9xb1
<http://schema.org/text>
"I can't seem to get this to work as it is - would I be better off always using a for loop in these type of situations?\n```teachers.py\ndef mostclasses(mydict):\n    values = list(mydict.values())\n    myidex = values.index(max(values))\n    myKey = list(mydict.keys())\n    return myKey[myidex]\n```"
<https://teamtreehouse.com/community/quick-question-over-about-my-code-dictionaries>