Instead of:
if(!(I in L))
You could do:
if(I nin L)
Why this is good:
It would (theoretically) slightly speed up runtime, because it doesn't have to do an extra not operation.
I think it might also speed up compile time a bit because instead of looking at 4 operators, it's looking at one, and it doesn't have to worry about the parentheses either when processing the order of operations. It's a small amount of time of course but !(I in L) appears a lot of times in many codebases.
!in