can it be shorter?

Paul Rubin http
Mon Jun 8 01:13:58 CEST 2009


Aaron Brady <castironpi at gmail.com> writes:
> url+= { '/': '' }.get( url[ -1 ], '/' )
> 
> Shorter is always better.

url = url.rstrip('/') + '/'



More information about the Python-list mailing list