On 04/18/2013 08:18 AM, Bradley Wright wrote:

   <SNIP>


Secondly, thanks Wolfgang
while raw_input not in ("quit", "q") - genius, i get your point clearly

But you have to combine his point with Chris's, don't forget the parens on the call to raw_input. And if it were I, I'd also put a prompt string in the call.

   while raw_input("q to quit") not in ("quit", "q"):



If you've got a list, and each time through you want to add some item(s) to a list, you can use the following idiom:

result = []     #empty list
for   whatever in something:
    value = another
    result.append(value)

Then when you finish the list, you can examine the whole list.

--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to