Michael Spencer wrote: > > Still, this is fascinating.... going to have to spend some time> > experimenting with groupby as soon as I get a chance....> >> Experimenting is good. So is the the documentation:> http://docs.python.org/tut/tut.html Reading documentation is a good idea, but I think your example would be more clear for Jordan if you used function attributes: def record(item): if len(item) > 20: record.seq +=1 return record.seq record.seq = 0 Serge.
Recent Messages in this Thread | ||
---|---|---|