Why "if condition" in two list comprehantions work faster then one cycle for with 2 two conditions?
Why "if condition" in two list comprehantions work faster then one cycle for with 2 two conditions? Question: import time from random import random from typing import List def test(arr: List[int] | None = None) -> None: if not arr: raise TypeError("Variable arr must exist!") opp = arr.pop() def check_time(func, msg): t0 = time.perf_counter() func() …