Re: Newbie append() question

2006-05-19 Thread Sybren Stuvel
Brian Blazer enlightened us with: > I'm still not sure why it was grabbing the prompt string though. Me neither. Try it in a standalone script instead of an interactive session. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but

Re: Newbie append() question

2006-05-19 Thread Brian Blazer
Thanks guys. Your solutions worked. I'm still not sure why it was grabbing the prompt string though. Thanks again, Brian [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie append() question

2006-05-19 Thread Sybren Stuvel
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

Re: Newbie append() question

2006-05-18 Thread Gerard Flanagan
Brian Blazer wrote: > I promise that this is not homework. I am trying to self teach here > and have run into an interesting problem. I have created a method > that asks for a class name and then is supposed to add it to classes > []. Here is a snippet: > > def getCurrentClasses(): > cl

Newbie append() question

2006-05-18 Thread Brian Blazer
I promise that this is not homework. I am trying to self teach here and have run into an interesting problem. I have created a method that asks for a class name and then is supposed to add it to classes []. Here is a snippet: def getCurrentClasses(): classes = [] print 'P