Modernize Python 2 for Python 3

This commit is contained in:
Grant Sanderson
2018-07-11 11:38:59 -07:00
parent a5adb90ae8
commit 151a270913
123 changed files with 785 additions and 707 deletions

View File

@ -1,5 +1,6 @@
import itertools as it
import numpy as np
from functools import reduce
def remove_list_redundancies(l):
@ -99,8 +100,8 @@ def make_even_by_cycling(iterable_1, iterable_2):
cycle1 = it.cycle(iterable_1)
cycle2 = it.cycle(iterable_2)
return (
[cycle1.next() for x in range(length)],
[cycle2.next() for x in range(length)]
[next(cycle1) for x in range(length)],
[next(cycle2) for x in range(length)]
)