Start with the simple basics; print big_list and make sure it contains what you think it does and is in the form you expect to be in. You can also add a print statement after
for item in big_list:
to print the item, but it is basically the same thing.
woooee
Posting Maven
2,707 posts since Dec 2006
Reputation Points: 827
Solved Threads: 780
Skill Endorsements: 9
Assuming the data is correct (and I'm not sure it is), try something along these lines
name_list=['romney','santorum','gingrich','paul']
found=False
for item in big_list:
if item[0] == "paul":
found=True
## if another name then stop processing
elif item[0] in ['romney','santorum','gingrich']:
found=False
if found:
for word in item:
if word in paul_dict:
paul_dict[word]+=1
else:
paul_dict[word]=1
woooee
Posting Maven
2,707 posts since Dec 2006
Reputation Points: 827
Solved Threads: 780
Skill Endorsements: 9