Aug-15-2019, 11:47 PM
i have a huge list that i want to test that everything is an expected type. i could test it like this:
if all(isinstance(x,types) for x in huge_list): ... # what to do if all items are a type of one of "types" else: ... # what to do if one or more items are not a type of one of "types"what i want to know is if all() quits early if one of its tests comes up False. documentation shows code that returns early. i want to know if "equivalent" really means that behavior or if it just means the result is "equivalent".
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.