擅长:python、mysql、java
<p>不,不可能在字符串中包含注释。python如何知道字符串中的散列符号<code>#</code>应该是一个注释,而不仅仅是一个散列符号?将<code>#</code>字符解释为字符串的一部分比将其解释为注释更有意义。在</p>
<hr/>
<p>作为一种解决方法,您可以使用自动字符串文本连接:</p>
<pre><code>(
"1,1,2,3,5,8,13\n" # numbers to the Fibonnaci sequence
"1,4,9,16,25,36,49\n" # numbers of the square number sequence
"1,1,2,5,14,42,132,429" # numbers in the Catalan number sequence
)
</code></pre>