This question is similar to Python - Find longest (most words) key in dictionary - but I need the pure number of characters.
Example input:
d = {'group 1': 1, 'group 1000': 0}
Output:
10
>>> max(len(x) for x in d)
or
>>> max(map(len, d))
2.1m questions
2.1m answers
60 comments
57.0k users