Need assistance

Joseph Lee joseph.lee22590 at
Fri Jul 17 04:44:32 CEST 2015

Hi Michael,
I have talked to this guy offlist (basically you gave him the answer

-----Original Message-----
From: Python-list
[ at] On Behalf
Of Michael Torrie
Sent: Thursday, July 16, 2015 7:41 PM
To: python-list at
Subject: Re: Need assistance

On 07/16/2015 08:15 PM, craig.sirna at 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.

Can you post the code that you are currently working with?

> 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)

Which search function are you talking about?  Is it a string method or
something else?

One of the first string methods I learned about when I first started with
Python was the .split() method. For example, in the interactive shell try

>>> a="one,two,three"
>>> a.split(',')

Does this help at all?

> 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.

Which part of indexing is confusing?  The syntax for slicing? I admit I
sometimes find it a bit complicated to know when and where to use -1 as the

> 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.

Again, show us the code you have so far and maybe we can help you figure it


More information about the Python-list mailing list