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


Groups > comp.lang.python > #94053

Re: Need assistance

Path csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'string.': 0.04; 'assignment': 0.07; 'indexing': 0.07; 'strings.': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'thu,': 0.15; 'elements,': 0.16; 'function).': 0.16; 'message-id:@web.de': 0.16; 'received:188.174': 0.16; 'received:80.91.229.3': 0.16; 'received :mnet-online.de': 0.16; 'received:plane.gmane.org': 0.16; 'reversed': 0.16; 'strong,': 0.16; 'subject:assistance': 0.16; 'used:': 0.16; 'wrote:': 0.16; 'string': 0.17; 'beginner': 0.18; 'string,': 0.18; 'input': 0.18; '2015': 0.20; 'first,': 0.20; 'daniel': 0.23; 'split': 0.23; 'words': 0.24; 'header:In-Reply- To:1': 0.24; 'header:User-Agent:1': 0.26; 'example': 0.26; 'header:X-Complaints-To:1': 0.26; 'order.': 0.27; 'function': 0.28; '-0700,': 0.29; 'necessary,': 0.29; 'spaces': 0.29; 'help,': 0.32; 'maybe': 0.33; 'doubt': 0.33; 'list': 0.34; 'could': 0.35; 'done': 0.35; 'but': 0.36; 'too': 0.36; '(and': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'display': 0.37; 'method': 0.37; 'received:org': 0.37; 'desired': 0.37; "won't": 0.38; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'your': 0.60; 'subject:Need': 0.61; 'charset:windows-1252': 0.62; 'between': 0.65; 'reverse': 0.66; 'here': 0.66; 'jul': 0.72; 'denis': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Sibylle Koczian <nulla.epistola@web.de>
Subject Re: Need assistance
Date Sat, 18 Jul 2015 12:35:10 +0200
References <225d4ac6-3b88-4844-805b-b4b00cd62ef4@googlegroups.com> <moc7aa$geg$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host ppp-188-174-164-192.dynamic.mnet-online.de
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0
In-Reply-To <moc7aa$geg$1@dont-email.me>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.675.1437215723.3674.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1437215723 news.xs4all.nl 2915 [2001:888:2000:d::a6]:59316
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:94053

Show key headers only | View raw


Am 18.07.2015 um 02:40 schrieb Denis McMahon:
> On Thu, 16 Jul 2015 19:15:38 -0700, craig.sirna wrote:
>
>> The assignment wants us to take a users first, middle and last name in a
>> single input ( name=('enter your full name: )).
>>
>> Then we must display the full name rearranged in Last, First Middle
>> order.
>
> To generate a list of words from a string, split the string up on the
> spaces between words. See the split method of strings.
>
> Having a list of words, get a copy of the list in reverse order. See the
> reversed function (and maybe the list function).
>
That won't really help, because the desired order is, with the example 
the OP used: Sirna Daniel Craig. So here indexing is necessary, but 
indexing of the list elements, not of the characters in the string.

(Necessary is too strong, because this could be done with rpartition. 
But I doubt that's the right answer for a beginner course.)

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


Thread

Need assistance craig.sirna@gmail.com - 2015-07-16 19:15 -0700
  Re: Need assistance Michael Torrie <torriem@gmail.com> - 2015-07-16 20:40 -0600
    Re: Need assistance craig.sirna@gmail.com - 2015-07-16 20:00 -0700
      RE: Need assistance "Joseph Lee" <joseph.lee22590@gmail.com> - 2015-07-16 20:12 -0700
  RE: Need assistance "Joseph Lee" <joseph.lee22590@gmail.com> - 2015-07-16 19:44 -0700
  Re: Need assistance Michael Torrie <torriem@gmail.com> - 2015-07-16 21:00 -0600
  Re: Need assistance Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-07-17 16:40 +0000
    Re: Need assistance Igor Korot <ikorot01@gmail.com> - 2015-07-17 12:54 -0400
    Re: Need assistance Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-17 20:00 +0100
  Re: Need assistance Denis McMahon <denismfmcmahon@gmail.com> - 2015-07-18 00:40 +0000
    Re: Need assistance Sibylle Koczian <nulla.epistola@web.de> - 2015-07-18 12:35 +0200
      Re: Need assistance Denis McMahon <denismfmcmahon@gmail.com> - 2015-07-19 00:59 +0000
        Re: Need assistance MRAB <python@mrabarnett.plus.com> - 2015-07-19 17:35 +0100
          flipping string order Denis McMahon <denismfmcmahon@gmail.com> - 2015-07-19 18:06 +0000
    Re: Need assistance Laura Creighton <lac@openend.se> - 2015-07-18 14:16 +0200
    RE: Need assistance "Joseph Lee" <joseph.lee22590@gmail.com> - 2015-07-18 09:05 -0700
    Re: Need assistance Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-07-18 12:18 -0400
    Re: Need assistance Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-18 18:34 +0100
      Re: Need assistance mm0fmf <none@mailinator.com> - 2015-07-18 19:51 +0100
        Re: Need assistance Joel Goldstick <joel.goldstick@gmail.com> - 2015-07-18 15:10 -0400
          Re: Need assistance mm0fmf <none@mailinator.com> - 2015-07-18 20:35 +0100
        Re: Need assistance Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-07-18 17:44 -0400
        Re: Need assistance Michael Torrie <torriem@gmail.com> - 2015-07-18 20:46 -0600
    Re: Need assistance Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-07-18 17:34 -0400
    Re: Need assistance William Ray Wing <wrw@mac.com> - 2015-07-18 14:28 -0400
    Re: Need assistance MRAB <python@mrabarnett.plus.com> - 2015-07-19 01:14 +0100
  Re: Need assistance craig.sirna@gmail.com - 2015-07-19 16:06 -0700
    Re: Need assistance Michael Torrie <torriem@gmail.com> - 2015-07-19 17:56 -0600
    Re: Need assistance Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-19 17:21 -0700
      Re: Need assistance Michael Torrie <torriem@gmail.com> - 2015-07-19 23:16 -0600
      Re: Need assistance Chris Angelico <rosuav@gmail.com> - 2015-07-20 15:25 +1000

csiph-web