Skip to content

Instantly share code, notes, and snippets.

@theepicsnail
Created August 18, 2023 03:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theepicsnail/8795cfc432d8745f3dab1e212317ab1e to your computer and use it in GitHub Desktop.
Save theepicsnail/8795cfc432d8745f3dab1e212317ab1e to your computer and use it in GitHub Desktop.
>>> d = defaultdict(int)
>>> for i in range(100000):
... d[len(set(random.randint(0,2047) for i in range(24)))] += 1
...
>>> print(d)
defaultdict(<class 'int'>, {24: 87462, 23: 11775, 22: 739, 21: 23, 20: 1})
87,472
100,000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment