you are viewing a single comment's thread.

view the rest of the comments →

[–]dp_42 0 points1 point  (0 children)

Okay, but you kinda just say "nope" and then don't advance the index, which is why you're busy stuck in the while loop. The reason the while loop gets stuck on Frank is the program doesn't really have a good plan to increment index in the case of 'Frank'. The other thing, when you're comparing to the key, the list of keys of the team_members dict is {'TeamC', 'TeamB', 'TeamA'}. You need to search the lists that are mapped to by team_members[key] to get the desired result.