Python comprehensions vs cycles
Almost all python programmers know that there are list comprehensions PEP 202. # create list of odd numbers with cycle a = [] for i in range(10): if i % 2: a.append(i) # create same collection using list comprehension a = [i for i in ran...
Aug 31, 20212 min read131