擅长:python、mysql、java
<p>您可以将要在<code>.py</code>文件中运行的每个笔记本转换,然后创建一个笔记本,将它们作为模块导入。大概是这样的:</p>
<p>脚本1.py:</p>
<pre><code>print('This is the first script.')
</code></pre>
<p>脚本2.py:</p>
<pre><code>print('This is the second script.')
</code></pre>
<p>脚本3.py:</p>
<pre><code>print('...and this is the last one!')
</code></pre>
<p>现在,您可以在单个脚本中导入它们(您可以在Jupyter中创建):</p>
<pre><code>import script1
import script2
import script3
# This is the first script.
# This is the second script.
# ...and this is the last one!
</code></pre>