You are viewing a single comment's thread. Return to all comments →
Pythonic solution:
def sockMerchant(n, ar): return sum([ar.count(color)//2 for color in set(ar)])
Sales by Match
You are viewing a single comment's thread. Return to all comments →
Pythonic solution: