Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Python Programming Language

strip newline from string


On 4/28/07, James <oscarthed@gmail.com> wrote:
[snip]

string.strip() returns a copy of the string with whitespace removed,
it does not modify it in place. What you really want is:

> username = getuser().strip()

Someone correct me if I'm wrong, but I believe just about all
functions from the string module are deprecated. Use the methods from
the string class. As I'm assuming getuser() returns a string object,
just use the string functions on that directly.

Ian

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc