Python learner needs help spotting an error
- by Protean
This piece of code gives a syntax error at the colon of "elif process.loop(i, len(list_i) != 'repeat':" and I can't seem to figure out why.
class process:
def loop(v1, v2):
if v1 < v2 - 1:
return 'repeat'
def isel(chr_i, list_i):
for i in range(len(list_i)):
if chr_i == list_i[i]:
return list_i[i]
elif process.loop(i, len(list_i) != 'repeat':
return 'error'()