Hi there, My apologies if this is a trivial question but I am sort of new to python. Here is my problem: I have a list of dictionaries. Each dictionary has a word and its position in the text the positions are in the form of a tuple. Here is an example: [ {'position': (5, 4), 'term': u'happy',}, {'position': (5, 5), 'term': u'something'} ]
for the potions, the first element is the paragraph number and the second is the word number in that paragraph(sequence from 1...n) What I would like to is find which words are next to each other. Meaning, they will be in the same paragraph and the difference of their word numbers is 1. Any help would be appreciated. Thank you _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor