在另一个列表中找到许多列表成员!蟒蛇

时间:2016-10-26 09:26:48

标签: python list

我在查找其他数组中的列表成员时遇到问题。它没有打印任何错误,但它打印任何东西..这是我的代码..我想搜索"假释"在frequencyzaparolespamglob,这是一个列表..这是错误的代码..抱歉我的英语不好。提前感谢您的关注......



requenzaparolehamglob=Counter()
i=0
while i < len(frequenzaparoleham):
    frequenzaparolehamglob= frequenzaparolehamglob + frequenzaparoleham[i]
    i=i+1

frequenzaparolespamglob=Counter()
i=0
while i < len(frequenzaparolespam):
    frequenzaparolespamglob= frequenzaparolespamglob + frequenzaparolespam[i]
    i=i+1

sommafreqspam= sum(frequenzaparolespamglob.values())

sommafreqham= sum(frequenzaparolehamglob.values())


frequenzaparolespamglob=sorted(list(collections.Counter(frequenzaparolespamglob).items()))
frequenzaparolehamglob=sorted(list(collections.Counter(frequenzaparolehamglob).items()))

inputemail = input('Inserisci una email:')
parole = nltk.word_tokenize(inputemail)
parole=[i for i in parole if i not in listastop]
parole = rimuovipunteggiatura.tokenize (str(parole))
parole=[i for i in parole if i.isalpha()]
parole=[ps.stem(parola) for parola in parole]
print(len(parole))
parole=list(parole)

while i <len(parole):
    while i < len(frequenzaparolespamglob):
        if parole[i] in frequenzaparolespamglob[i]:
            print('Found a entry:', parole[i])
&#13;
&#13;
&#13;

0 个答案:

没有答案