a = "foo"
b = "bar"
",".join([a, b])
Will be fixed to
a = "foo"
b = "bar"
"{},{}".format(a, b)
seq = range(10)
for x in seq:
yield x
Will be fixed to
seq = range(10)
yield from seq
for i in range(len(sequence)):
a = sequence[i]
print(a)
Will be fixed to
for i, a in enumerate(sequence):
print(a)
for i in range(10):
if i == 2:
print(1)
print(2)
Will be fixed to
for i in (x for x in range(10) if x == 2):
print(1)
print(2)
seq_a = [0]
seq_b = range(10)
for i in seq_a:
for j in seq_b:
print(i, j)
Will be fixed to
seq_a = [0]
seq_b = range(10)
for i, j in ((i,j) for i in seq_a for j in seq_b):
print(i, j)