How to calculate the time complexity of zip ()?
testList = [[1,2,3]for _ in range(5)] zip(*testList)
Suppose you zip N iterables.
python 3.x zip O(1) , ( zip-) , ( , zip) - O(N), . next O(N). , - zip- O(N*M) , M ( ) , , ( zip).
O(1)
O(N)
next
O(N*M)
python 2.x zip . , , O(N*M), , zipped iterables.