擅长:python、mysql、java
<p>首先,您需要一个<code>global</code>语句来更改任何全局变量(比如<code>payment</code>)。你知道吗</p>
<pre><code>payment = []
def takenotes():
global payment
payment = [20, 20, 20, 20]
</code></pre>
<p>代码中也没有<code>input()</code>函数。见<a href="https://docs.python.org/3/library/functions.html#input" rel="nofollow">the docs</a>。你知道吗</p>