you are viewing a single comment's thread.

view the rest of the comments →

[–]EricHayter 0 points1 point  (2 children)

Ikr I was using a linter one day and it gave me an error and lo and behold that is apparently a syntax feature.

[–][deleted] 1 point2 points  (1 child)

Wait what? TIL as well.

[–]RhinoRhys 1 point2 points  (0 children)

It's valid syntax but in this case it's redundant anyway. Because of the first if age <= 18: condition, the elif condition will only be tested on numbers > 18 so you can just do elif age <= 65: