[Zope-DB] How do I trim white space before inserting into database

Dieter Maurer dieter@handshake.de
Sat, 6 Apr 2002 00:02:54 +0200


Jeffrey Turmelle writes:
 > ...
Python's string objects have a method "strip" that removes leading
and trailing white space.

    "  this is a string with leading and trailing white space   ".strip()

will give you

    "this is a string with leading and trailing white spac"


Dieter