[Tutor] Small personal project to fill CDs/DVDs...

2013-01-23 Thread SCS Barry
Need to fill some DVDs. Figured Python would be the tool to quickly write this tool in, since I have seen similar tools written in python. I even found something onlist to start from... from August 2004. Sent: Sunday, August 15, 2004 9:22 PM Subject: Re: [Tutor] List files in directory "Berna

Re: [Tutor] Calculate hours

2013-01-23 Thread anthonym
Thanks Dave. I forgot to hit the reply to all last time. I am going to try the loop when I get back home and will let you know how I make out. Also we have done some functions. Sort and append being among them. I try the simplest way first then stream line later. Probably not the fastest way.

Re: [Tutor] Calculate hours

2013-01-23 Thread Mitya Sirenef
On 01/23/2013 06:13 PM, Alan Gauld wrote: On 23/01/13 03:08, Mitya Sirenef wrote: > >> To make the change you need, use list comprehension to make sums of all >> rows, sort it (using list sort method); iterate over it using >> enumerate() and print out "employee N, sum of hours:" > > One proble

Re: [Tutor] Calculate hours

2013-01-23 Thread Dave Angel
On 01/23/2013 06:13 PM, Alan Gauld wrote: On 23/01/13 03:08, Mitya Sirenef wrote: To make the change you need, use list comprehension to make sums of all rows, sort it (using list sort method); iterate over it using enumerate() and print out "employee N, sum of hours:" One problem with that a

Re: [Tutor] Calculate hours

2013-01-23 Thread Alan Gauld
On 23/01/13 03:08, Mitya Sirenef wrote: To make the change you need, use list comprehension to make sums of all rows, sort it (using list sort method); iterate over it using enumerate() and print out "employee N, sum of hours:" One problem with that approach is that the employees are identifie

Re: [Tutor] Calculate hours

2013-01-23 Thread Dave Angel
On 01/22/2013 11:18 PM, anthonym wrote: Thanks Dave I think I would like to keep it simple. How would I get it to repeat and print before deleting? To repeat something, write a loop. So you have a while loop *outside* the one you've written (you'll have to indent your present loop another