def slash_url_suffix(url, suffix):
 return ((url.endswith('/') and ('%s/' % suffix)) or ('/%s' % suffix))

def slash_url_suffix ( url , suffix ) : return ( ( url . endswith ( '/' ) and ( '%s/' % suffix ) ) or ( '/%s' % suffix ) )
adds a slash either to the beginning or the end of a suffix .