Reason for “all” and “any” result on empty lists
问题 In Python, the built-in functions all and any return True and False respectively for empty iterables. I realise that if it were the other way around, this question could still be asked. But I'd like to know why that specific behaviour was chosen. Was it arbitrary, ie. could it just as easily have been the other way, or is there an underlying reason? (The reason I ask is simply because I never remember which is which, and if I knew the rationale behind it then I might. Also, curiosity.) 回答1: