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


Groups > comp.lang.python > #94016

Re: Need assistance

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ikorot01@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.023
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'assignment': 0.07; 'indexing': 0.07; 'fix.': 0.09; 'lost.': 0.09; 'python': 0.10; 'index': 0.13; 'times,': 0.13; 'do,': 0.15; 'thu,': 0.15; 'input.': 0.16; 'subject:assistance': 0.16; 'wrote:': 0.16; 'later': 0.16; 'string': 0.17; ';-)': 0.18; 'input': 0.18; '2015': 0.20; 'first,': 0.20; 'to:name:python-list@python.org': 0.20; 'to:2**1': 0.21; 'space.': 0.22; 'trying': 0.22; 'code.': 0.23; 'bit': 0.23; 'daniel': 0.23; 'minutes.': 0.23; 'split': 0.23; "haven't": 0.24; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; 'appreciated.': 0.27; 'figure': 0.27; 'fri,': 0.27; 'order.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'correct': 0.28; 'function': 0.28; '-0700,': 0.29; 'index,': 0.29; 'spaces': 0.29; "i'm": 0.30; 'url:mailman': 0.30; "can't": 0.32; 'problem': 0.33; 'url:python': 0.33; 'him.': 0.33; "i'll": 0.33; 'url:listinfo': 0.34; 'received:google.com': 0.35; 'next': 0.35; 'but': 0.36; 'should': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'to:addr :python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'display': 0.37; 'hi,': 0.38; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'url:3': 0.60; 'your': 0.60; "you'll": 0.61; 'address': 0.61; 'subject:Need': 0.61; 'back': 0.62; 'spot': 0.63; 'incorporate': 0.66; 'course.': 0.67; 'jul': 0.72; 'gotten': 0.76; 'feet.': 0.84; 'hammer': 0.84; 'homework': 0.84; 'inefficient': 0.91; 'mean.': 0.91; 'forever.': 0.93; 'hand,': 0.97
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/Jl4inbsYm0cV9QOvXAWWwWRiDFNqjJCRh4oMywdgNI=; b=cbKYjMfXWPHlfO9QoOmpfnSGt0D7raGYFKHpKMSItphTFMZ3pNggpKE/KctgC3295G IReKNujKutP4qL/9DixJ3k7pg1l8RKsTdJXObLrvIQCahRPJGQDkoiYVTAX6q+UqkGhW yPReFMi1oWkqy3inwHSR+R0pdpTpIpD1xjFyWPt+HSz2CK8c6O+vxPCQqlv5qcxuuqMU Q6MG60WvauFy3bQVHaCiHk3tNlAMJrKNC5Wnq2HRgwkfOZS+8MPlA9Mq780sh1Tue4AO W8JwR7VLbS7HrmQhbQ8czs46RrfD4s+TqNzFkTTJ+IMNU6fqwEIOONe9j1V+fsuJV3U7 3RcA==
MIME-Version 1.0
X-Received by 10.194.59.98 with SMTP id y2mr32035357wjq.42.1437152040459; Fri, 17 Jul 2015 09:54:00 -0700 (PDT)
In-Reply-To <mobb5r$srh$1@dont-email.me>
References <225d4ac6-3b88-4844-805b-b4b00cd62ef4@googlegroups.com> <mobb5r$srh$1@dont-email.me>
Date Fri, 17 Jul 2015 12:54:00 -0400
Subject Re: Need assistance
From Igor Korot <ikorot01@gmail.com>
To Rob Gaddi <rgaddi@technologyhighland.invalid>, "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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.651.1437152048.3674.python-list@python.org> (permalink)
Lines 53
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1437152048 news.xs4all.nl 2940 [2001:888:2000:d::a6]:38869
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:94016

Show key headers only | View raw


 Hi, Rob,

On Fri, Jul 17, 2015 at 12:40 PM, Rob Gaddi
<rgaddi@technologyhighland.invalid> wrote:
> On Thu, 16 Jul 2015 19:15:38 -0700, craig.sirna wrote:
>
>> I need help writing a homework program.
>>
>> I'll write it, but I can't figure out how to incorporate what I have
>> read in the book to work in code.
>>
>> 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.
>>
>> I tried to use the search function in Python to locate any spaces in the
>> input. It spot back the index 5 (I used Craig Daniel Sirna)
>>
>> That is correct for the first space, but I can't figure out how to get
>> it to continue to the next space.
>>
>> The indexing process is also a bit confusingto me.
>>
>> I get that I can use len(fullName) to set the length of the index, and
>> how the index is counted, but after that I'm lost.
>>
>> I have emailed my professor a few times, but haven't gotten a
>> response.(online course)
>>
>> Any help would be greatly appreciated.
>
> 1) Use the interactive console.  Set x = 'Craig Daniel Sirna' and play
> with indexing and slicing it until you really internalize what they
> mean.  x[3], x[-3], x[0:10], x[0:-1].  It's not actually relevant to the
> problem at hand, but right now is the time in your education to get
> indexing down cold; skimp on it now and you'll pay for it forever.
> Should take you about 5 minutes.
>
> 2) https://docs.python.org/3/library/stdtypes.html#string-methods
> You can do what you're trying to do, but you're swinging a hammer with a
> powered nailgun at your feet.  Search is an inefficient way to try to
> split a string into parts based on a delimiter.

Most likely it's not him. They will learn it later during the course. ;-)

>
> --
> Rob Gaddi, Highland Technology -- www.highlandtechnology.com
> Email address domain is currently out of order.  See above to fix.
> --
> https://mail.python.org/mailman/listinfo/python-list

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