擅长:python、mysql、java
<p>用<code>return inventedfunction(list2)</code>替换<code>inventedfunction(list2)</code>。如果只调用它而不使用return语句,则会抛出结果。你知道吗</p>
<p>工作代码:</p>
<pre><code>def inventedfunction(list1):
list2=list1[:-1]
if len(list2)!=1:
return inventedfunction(list2)
else:
return list2
</code></pre>