I’m trying to learn python and came across some code that is nice and short but doesn’t totally make sense
the context was:
return len(args) and max(args)-min(args)
I get what it’s doing, but why does python do this – ie return the value rather than True/False?
10 and 7-2
returns 5. Similarly, changing the and to or will resul….