Need assistance
Denis McMahon
denismfmcmahon at gmail.com
Fri Jul 17 20:40:43 EDT 2015
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).
Note - reversed returns an iterable, list will convert the iterable to a
list.
To join the elements of a list into a string, see the join method of
strings.
--
Denis McMahon, denismfmcmahon at gmail.com
More information about the Python-list
mailing list