a re problem

cheng magicmas at spymac.com
Sat May 28 01:56:56 EDT 2005


hi,all, i try to replace every target word found in the text

 for target in splitText:
        if stopwords.find(target) >= 0 :
            text = re.sub(r'\b%s\b','',text) &target

when i using the statment:

text = re.sub(r'\b%s\b','',text) &target

 get error : unsupported operand type(s) for &: 'str' and 'str'

is it some idea that can modity it and make it work?




More information about the Python-list mailing list