[Tutor] 2 problems in a small script

Dick Moores rdm at rcblue.com
Fri Oct 12 10:16:57 CEST 2007

At 10:53 PM 10/11/2007, Dick Moores wrote:
>Please see the code and it's output here:
>I'm attempting to eliminate the elements (strings) of lstA that are
>not well-formed in that they contain at least one character that is
>not in the string astr.
>1) If lstA[n] is removed, lstA[n+1] is skipped--isn't examined at
>all, and remains in the final form of lstA whether well-formed or not.
>Using print statements is as far as my debugging skills go, so you
>can see of bunch of them in the code. I did try to use winpdb for the
>first time, but haven't figured it out yet. Ulipad now has it built
>in, so I'd like to learn to use it it..
>2) I'm not able to get the "for char in wordWithCommas:" loop to stop
>examining a wordWithCommas after it's word has been removed. I've
>tried "continue" and "break" in various places to no avail.
>I'd appreciate some help.

Now that Aditya and Alan have come to my rescue, problem #1 has been 
solved. But #2 remains..


More information about the Tutor mailing list