[Tutor] Help Needed

Serdar Tumgoren zstumgoren at gmail.com
Mon Jun 15 22:11:43 CEST 2009


Hi Raj,

It might be easier if you create a simple test string inside the
python interpreter and then tinker with it there. once you've found
the solution, you can graft it onto the broader program that accepts
user input.

For example, you might create the following variable

     message = "This is a message"

And then try splitting that message based on spaces and then using the
"reverse" list method to switch the order. Or you could iterate
through each character in the string and add it to a list, then apply
the reverse method.

Not sure precisely what you're getting at, but a little
experimentation in the interpreter will probably lead you to a
solution.

HTH,

Serdar


More information about the Tutor mailing list