path slashes cleaning
f.guerrieri at gmail.com
Thu Sep 4 15:32:02 CEST 2008
On Thu, Sep 4, 2008 at 3:25 PM, Mathieu Prevot <mathieu.prevot at gmail.com> wrote:
> for scripts that take arguments, I would like to remove the trailing
> slash if it's present.
> Is there something else than:
> if a[-1] == '/':
> a = list(a)
a.rstrip('/') does the job.
More information about the Python-list