Newbie append() question

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Fri May 19 04:35:05 EDT 2006


Brian Blazer enlightened us with:
> def getCurrentClasses():
>          classes = []
>          print 'Please enter the class name. When finished enter D.'
>          while (c != "D"):

No need for the parentheses, and 'c' doesn't have a value yet. If you
add 'c=""' before the while-loop, it should be fine.

>              c = raw_input("Enter class name")
>              if (c != "D"):

Here there is also no need for parentheses.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list