Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #43806
| Path | csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.054 |
| X-Spam-Evidence | '*H*': 0.89; '*S*': 0.00; 'function:': 0.09; 'things,': 0.09; 'typed': 0.09; 'dictionary.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'redundant': 0.16; 'str()': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'trying': 0.19; 'subject:Issue': 0.19; 'thu,': 0.19; 'print': 0.22; 'string,': 0.24; 'sort': 0.25; "i've": 0.25; 'script': 0.25; 'appreciated': 0.26; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'getting': 0.31; 'minor': 0.31; 'wright': 0.31; 'anyone': 0.31; 'figure': 0.32; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'so,': 0.37; 'list': 0.37; 'to:addr:python-list': 0.38; 'issue': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'users': 0.40; 'how': 0.40; 'till': 0.61; 'numbers': 0.61; "you're": 0.61; "you'll": 0.62; 'information': 0.63; 'name': 0.63; 'needing': 0.65; 'here': 0.66; 'gotten': 0.74; 'day': 0.76; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=u7URkx01S4pd07/2OdDQab6tTEIpcKUBtjTM7QUzpbU=; b=OgKmGxmLxaFOtk6qYSdli3leAWfDhPUFMemJgt/n7++QmBF3K5ZmiJcOAXoBGDTvQN IoaqKXy12IvQsqZ09yGdqOvEiSdHDCe+fEsiv+yzes5klMQyotKRlbS+vBg9j7dKGcYh OqTP2u/o3QymQyz4+z0m7Ge5RbantxLsZ4IRVPTMd8H3uNkqUCDjH7ieOPSa1NQ3ASc3 ld2hlQWR/d/1je6G8azG44WjeN/oCHXJEtoBggHa+74o6bInomEk2fWEIqvy6MkXwSzl hX0cNL1FHvpVhM5FLjZWeRAsVFJWbhPwulxB5L+hvYpS2qsVkvFpYcGNFR/d3yJi4EI+ 5sIw== |
| MIME-Version | 1.0 |
| X-Received | by 10.58.75.46 with SMTP id z14mr6939057vev.52.1366258481697; Wed, 17 Apr 2013 21:14:41 -0700 (PDT) |
| In-Reply-To | <0fa050c1-3a00-4c17-9fa6-b79a22485c7a@googlegroups.com> |
| References | <0fa050c1-3a00-4c17-9fa6-b79a22485c7a@googlegroups.com> |
| Date | Thu, 18 Apr 2013 14:14:41 +1000 |
| Subject | Re: Novice Issue |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.754.1366258490.3114.python-list@python.org> (permalink) |
| Lines | 34 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1366258490 news.xs4all.nl 2235 [2001:888:2000:d::a6]:38426 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:43806 |
Show key headers only | View raw
On Thu, Apr 18, 2013 at 2:06 PM, Bradley Wright
<bradley.wright.biz@gmail.com> 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":
You'll want to actually _call_ that function: raw_input()
>
> print ""
> name = str(raw_input("Name: "))
> number = str(raw_input("Number: "))
> description = str(raw_input("Description: "))
raw_input already returns a string, so the str() is redundant here.
> 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
Once you have all the values, you just need to figure out what you're
trying to do with them. Do you need to retain them till the end of the
loop? If so, consider a list or dictionary. Or do you need to work
with them right there inside the loop? What are you needing to
accomplish?
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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