[Tutor] a quick Q: how to use for loop to read a series of files with .doc end
lina.lastname at gmail.com
Fri Oct 7 14:21:01 CEST 2011
On Fri, Oct 7, 2011 at 6:25 PM, Dave Angel <d at davea.name> wrote:
> On 10/07/2011 06:06 AM, Alan Gauld wrote:
>> On 07/10/11 09:08, lina wrote:
>>> for a,b in zip(results['E'],results['B'])**:
>> I don't know why this gives a key error on 'E' (which basically means that
>> there is no key 'E') since the code above should guarantee that it exists.
>> Odd. I'm also not sure why the error occurs after it prints summary. Are you
>> sure the output is in the sequence you showed in your message?
>> One simple explanation: it continued on to the next file, which has
> neither "E" nor "B" in it.
In this directory, I only kept one file. try.xpm
$ more try.xpm
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor