我在 moy 代码中有一个元组:
('H', 'NNP')
这是代码:
# -*- coding: utf-8 -*-
from nltk.corpus import wordnet as wn
from nltk import pos_tag
import nltk
syno =[]
sentence = '''His father suggested he study to become a parson instead, but Darwin was far more inclined to study natural history.DarwinDar·win (där'wĭn),Charles Robert.1809-1882.British naturalist who revolutionized the study of biology with his theory ofevolutionbased on natural selection
Like several scientists before him, Darwin believed all the life on earth evolved (developed gradually) over millions of years from a few common ancestors.'''
sent = pos_tag(sentence)
alpha = [s for s in sent if s[1] == 'NNP']
for i in range(0,len(alpha)-1):
print alpha[i] #return the tuple
我只想从中删除 H 。我该怎么做?