En Sun, 27 May 2007 07:19:15 -0300, mark <[EMAIL PROTECTED]> escribió:
> I posted earlier on this but have changed my approach so here is my > latest attempt at solving a problem. I have been working on this for > around 12 hours straight and am still struggling with it. Almost done. Just two things: - You have defined a function to convert the file format into tuples. But you are not consistent with the ordering: in the file they come rank+space+suit. When you convert to tuple you use (suit,rank). Inside the comparison function you use a[0] as rank and a[1] as suit again. Be consistent. - The sort expects a list of tuples, but you still use the lines read from the file; you forgot to call the function above to convert them. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list