Re: How may I change values in tuples of list of lists?

2016-02-23 Thread Ben Finney
subhabangal...@gmail.com writes: > Now if I want to change the values of tags like 'AT', 'NP-TL', > 'NN-TL', etc. to some arbitrary ones like XX,YY,ZZ and yet preserve > total structure of tuples in list of lists, please suggest how may I > do it. Changing items in lists is done by assigning to

How may I change values in tuples of list of lists?

2016-02-23 Thread subhabangalore
Hi I am trying to use the following set of tuples in list of lists. I am using a Python based library named, NLTK. >>> import nltk >>> from nltk.corpus import brown as bn >>> bt=bn.tagged_sents() >>> bt_5=bt[:5] >>> print bt [[(u'The', u'AT'), (u'Fulton', u'NP-TL'), (u'County', u'NN-TL'),