All,
I have a list of strings that I want to break them into separate words, and a combination of words then store them into a list. Example below of a string: "Hello Python team". The data structure: [ ['Hello'], ['Hello', 'Python'], ['Hello', 'Python', 'team'], ]'Python'], ]'Python', 'team'], ['team'] ] I want to know if there is a better method in doing this without the requirement of a module. Eventually I want to count the number of hits in a list of strings based upon the word combinations regardless where they are located in the string. This last part is something I am struggling with to get results that are correct. I have stored them in a dictionary and get unexpected totals. Was thinking of using collection and still working on it. If the above could be improved. I would be grateful. Sean _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor