擅长:python、mysql、java
<p>你给出的解决方案很好。您可以使用字符串格式使其看起来更漂亮:</p>
<pre><code>'/{0}/'.format('/'.join(['a', 'b'. 'c'])
</code></pre>
<p>或者将来在3.6中使用<a href="https://www.python.org/dev/peps/pep-0498/" rel="nofollow">Literal String Interpolation</a>:</p>
<pre><code>f"/{format('/'.join(['a', 'b'. 'c'])}/"
</code></pre>