Mathijs wrote:
> Op 20 jan 2006 vond Duncan Booth <[EMAIL PROTECTED]>: >> Or in other words, define a function to return a dictionary >> containing a count of the number of occurrences of each element in >> the list (this assumes that the list elements are hashable). Then you >> just add up the values in the test list making sure each count is >> limited to no higher than the reference count. > > Thanks. Though I don't know much about python (yet), this is more or > less the way I'de do it the language I'm more comfortable with (object > pascal), and I wouldn't label this as a pythonic solution. I could be > wrong, though:) > I'm curious what you think isn't pythonic about this solution? -- http://mail.python.org/mailman/listinfo/python-list