擅长:python、mysql、java
<p>我已经试过你的问题了复制'联机编译器。
<a href="https://repl.it/J7aF/3" rel="nofollow noreferrer">Here Your Link</a></p>
<pre><code>def function1():
try:
return True
except :
return False
def function2():
try:
return True
except:
return False
def outer_function():
return 'It worked'
def fun():
if function1():
return [function1(), outer_function()]
else:
return function2()
print(fun())
</code></pre>