Re: tallying occurrences in list

2010-06-05 Thread Sreenivas Reddy Thatiparthy
On Jun 4, 11:14 am, kj wrote: > Task: given a list, produce a tally of all the distinct items in > the list (for some suitable notion of "distinct"). > > Example: if the list is ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', > 'c', 'a'], then the desired tally would look something like this: > > [('a',

Re: using def in pythons

2008-12-30 Thread Sreenivas
On Dec 30, 3:37 pm, ibpe...@gmail.com wrote: > hi, > > i want to have a broad knowledge on the use of "def" in python as i > know i might need it > to my string handling and for a lot of things in general. > > I will really appreciate anybody who can support my mission of > becoming a python Progra