Skip to content

Instantly share code, notes, and snippets.

@leonbeckert
Created September 19, 2022 20:56
Show Gist options
  • Save leonbeckert/94d969d8c6231616d5f5f924900f6e42 to your computer and use it in GitHub Desktop.
Save leonbeckert/94d969d8c6231616d5f5f924900f6e42 to your computer and use it in GitHub Desktop.
Generate list of all possible IMDb IDs
import itertools
# Generate classic seven digit IDs
for combination in itertools.product(range(10), repeat=7):
print('tt' + ''.join(map(str, combination)))
# Generate new eight digit IDs
for combination in itertools.product(range(10), repeat=7):
print('tt1' + ''.join(map(str, combination)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment