[Tutor] Bundle help!

Alan Gauld alan.gauld at btinternet.com
Mon Jul 9 19:53:45 CEST 2007


"Sara Johnson" <sarliz73 at yahoo.com> wrote 

> this is sort of a script that was written and I'm making 
> modifications to.  Due to my serious lack of experience, 
> I'm afraid to rewrite anything.  

This is probably a long shot given the code you've posted so far, 
but I don't suppose there are any design documents available? 
Structure charets, class diagrams? Even plain text or pseudo 
code?

In an ideal world it would be possible to find the faulty function 
without having to read any code, but few projects are that well 
documented. But then again few projects have nothing! If you 
can find it it might tell you at a high level how the code hangs 
together.

> However, would I accomplish the same result by copying 
> the lists, then breaking them apart with zip()?  

I'm not sure zip is the best tool for breaking lists apart, 
but I'm no expert with it. But its easy to do with a simple 
loop if you are dealing with a list of tuples:

list1 = []
list2 = []
for item in theList:
    list1.append(item[0])
    list2.append(item[1])

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld



More information about the Tutor mailing list