[Tutor] pruning and ordering a list of lists

William O'Higgins Witteman hmm at woolgathering.cx
Thu Mar 22 20:58:09 CET 2007


I have a list of lists derived from a log file that I want to create a
summary of, but I am not sure of an approach to do what I need.

Here's a sample of the data:

[["user1","18/Mar/2007:07:52:38 -0400"],["user1","18/Mar/2007:07:52:40 -0400"],["user2","18/Mar/2007:07:52:42 -0400"],["user3","18/Mar/2007:07:52:42 -0400"],["user2","18/Mar/2007:07:52:43 -0400"]]

What I want as output is something like this:

[["first user alphabetically","most recent timestamp for this user"],["second user alphabetically","most recent timestamp for this user"], ...]

Can anyone suggest an approach for this?  Thanks.
-- 

yours,

William


More information about the Tutor mailing list