Re: For_loops hurt my brain.

2008-07-16 Thread mizhi
Other possibility, combining Dan and Fredrik's posts: import zipfile import os zips = { 'c:/spare.zip': ['c:/spare/huge.fm3', 'c:/spare/huge.wk3'], 'c:/seekfacts.zip': ['c:/seekfacts/bookmark.html', 'c:/seekfacts/ index.htm', 'c:/seekfacts/seek.css', 'c:/seekfacts/seek.js'] }; def z

Re: For_loops hurt my brain.

2008-07-16 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: This script uses a simple for loop to zip some files. However I am repeating code that cries out for a nested loop. Cries out for a *function*, I'd say. My two lists of files_to_be_zipped (spare and seekfacts) are of > uneven length so I can't seem to decipher the "

Re: For_loops hurt my brain.

2008-07-16 Thread Dan
On Jul 16, 1:42 pm, [EMAIL PROTECTED] wrote: > This script uses a simple for loop to zip some files. However I am > repeating code that cries out for a nested loop. My two lists of > files_to_be_zipped (spare and seekfacts) are of uneven length so I > can't seem to decipher the "for_logic". I would

For_loops hurt my brain.

2008-07-16 Thread bsagert
This script uses a simple for loop to zip some files. However I am repeating code that cries out for a nested loop. My two lists of files_to_be_zipped (spare and seekfacts) are of uneven length so I can't seem to decipher the "for_logic". I would appreciate any help. Thanks, Bill import zipfile im