how to avoid leading white spaces

Neil Cerutti neilc at norwich.edu
Thu Jun 2 09:21:06 EDT 2011


On 2011-06-01, rurpy at yahoo.com <rurpy at yahoo.com> wrote:
> For some odd reason (perhaps because they are used a lot in
> Perl), this groups seems to have a great aversion to regular
> expressions. Too bad because this is a typical problem where
> their use is the best solution.

Python's str methods, when they're sufficent, are usually more
efficient.

Perl integrated regular expressions, while Python relegated them
to a library.

There are thus a large class of problems that are best solve with
regular expressions in Perl, but str methods in Python.

-- 
Neil Cerutti



More information about the Python-list mailing list