Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43819

Re: Novice Issue

Newsgroups comp.lang.python
Date 2013-04-18 05:18 -0700
References <0fa050c1-3a00-4c17-9fa6-b79a22485c7a@googlegroups.com>
Message-ID <36c94c5e-6ad1-4aba-b18c-61cf14cf102c@googlegroups.com> (permalink)
Subject Re: Novice Issue
From Bradley Wright <bradley.wright.biz@gmail.com>

Show all headers | View raw


On Thursday, April 18, 2013 12:06:59 AM UTC-4, Bradley Wright wrote:
> Good Day all, currently writing a script that ask the user for three things;
> 
> 1.Name
> 
> 2.Number
> 
> 3.Description
> 
> I've gotten it to do this hurah!
> 
> 
> 
> print "Type \"q\" or \"quit\" to quit"
> 
> while raw_input != "quit" or "q":
> 
>     
> 
>     print ""
> 
>     name = str(raw_input("Name: "))
> 
>     number = str(raw_input("Number: "))
> 
>     description = str(raw_input("Description: "))
> 
> 
> 
> but here a few things, can anyone help me on figuring out how to at the users whim print out all of the names, numbers and descriptions. this is sort of an information logger.
> 
> 
> 
> additionally, minor issue with getting script to stop when q or quit is typed
> 
> 
> 
> any help would be greatly appreciated

Joining this group has been the smartest decision since birth 

Firstly, thanks Chris - str() [REMOVED]
and yes i would like to retain them until the end of the loop simply for printing or viewing purposes. [I'll DO MORE RESEARCH ON LISTS] 

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

Thirdly, thanks mark
went through the link you provided, insightful

Cheers

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Novice Issue Bradley Wright <bradley.wright.biz@gmail.com> - 2013-04-17 21:06 -0700
  Re: Novice Issue Chris Angelico <rosuav@gmail.com> - 2013-04-18 14:14 +1000
  Re: Novice Issue Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2013-04-18 08:58 +0000
  Re: Novice Issue Chris Angelico <rosuav@gmail.com> - 2013-04-18 19:06 +1000
  Re: Novice Issue Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-18 11:10 +0100
  Re: Novice Issue Bradley Wright <bradley.wright.biz@gmail.com> - 2013-04-18 05:18 -0700
    Re: Novice Issue Dave Angel <davea@davea.name> - 2013-04-18 08:29 -0400
  Re: Novice Issue Bradley Wright <bradley.wright.biz@gmail.com> - 2013-04-18 05:34 -0700
  Re: Novice Issue John Gordon <gordon@panix.com> - 2013-04-18 14:21 +0000

csiph-web