I just stumbled on the following #Python code
if not (3 <= len(sys.argv) <= 4):
Which I find quite confusing (or even revolting)
Additionally I think it is wrong as the program takes exactly 2 arguments.
So
if ( len(sys.argv) != 3):
would have been far easier to understand.
Nevertheless, can a #Pythonista please explain me the pattern?
From other programming languages I would have expected it to fail miserably because the evaluation order would have created something like
(3 <= len(sys.argv) )<= 4)
where the first part would evaluate to true or false which both are likely smaller than 4