id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

rmueller@lasacs.com dictionary-1 > dups2
prev  |  next  |  chance

Once again we want to determine the duplicate names in a list. Given a list of names, return a sorted list of lists where each list contains the names that occur more than once and how often they occur.


dups2(['alpha', 'beta', 'gamma', 'delta', 'alpha']) → [['alpha', 2]]
dups2(['alpha', 'beta', 'gamma', 'delta']) → []
dups2(['abc', 'xyz', 'mnp', 'mnp', 'abc', 'xyz', 'abc']) → [['abc', 3], ['mnp', 2], ['xyz', 2]]

...Save, Compile, Run (ctrl-enter)

def dups2(names):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 200

Copyright Nick Parlante 2017 - privacy