у FishHook'а первая выдаёт ошибку с индексом
lst = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192] if len(lst) < 2: raise ValueError("len < 2") n = lst[1]/lst[0] start = lst[0] def get_progress(start, n): val = start while 1: val *= n yield val progress = get_progress(start, n) success = True for x in lst[1:]: if x != progress.next(): success = False break print success