Python learner needs help spotting an error

Posted by Protean on Stack Overflow See other posts from Stack Overflow or by Protean
Published on 2010-03-08T05:18:35Z Indexed on 2010/03/08 5:21 UTC
Read the original article Hit count: 439

Filed under:
|

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'()

© Stack Overflow or respective owner

Related posts about python

Related posts about beginner