Re: [Tutor] Finding items in a list

2006-02-27 Thread Hugo González Monteverde
As others have said, a concrete example would be great. For the time being, sounds like maybe regular expressions could do it. We don't know if your data is already in a list of small strings, or if it is just a huge string. Take a look here for an intro to RE, though: http://www.amk.ca/python

Re: [Tutor] Finding items in a list

2006-02-24 Thread Kent Johnson
Emily, As Danny suggests, a concrete example of your input and output would be very helpful. It sounds like you have some data that looks like CLUSTER 1 SOMETHING ELSE CLUSTER 5 MORE STUFF ETC and you would like to make a list of [1, 5] - the data after 'CLUSTER'. Is that right? Here is someth

Re: [Tutor] Finding items in a list

2006-02-24 Thread Danny Yoo
On Fri, 24 Feb 2006, Emily Patek wrote: > I am trying to break apart a list into several smaller lists based on > repeating nearly identical entries. For example, every so often there > is the word CLUSTER with a number after it, like CLUSTER 1. I can find > them one by one, but would like to