Containment checking is much faster on a set than a list in Python.

Editable Code

1870 views

Code copied

pym.dev/p/2aayq/

URL copied

Need to share some Python code?

New Python snippet