can it be shorter?

tsangpo tsangpo.newsgroup at gmail.com
Sat Jun 6 17:07:58 CEST 2009


I want to ensure that the url ends with a '/', now I have to do thisa like 
below.
url = url + '' if url[-1] == '/' else '/'

Is there a better way? 




More information about the Python-list mailing list