擅长:python、mysql、java
<p>在Python>;=3.6中,新的<a href="https://docs.python.org/3.6/reference/lexical_analysis.html#f-strings" rel="noreferrer">f-string</a>是连接字符串的有效方法。</p>
<pre><code>>>> name = 'some_name'
>>> number = 123
>>>
>>> f'Name is {name} and the number is {number}.'
'Name is some_name and the number is 123.'
</code></pre>