![](/img/trans.png)
[英]Run a Python script from Python prompt such that variables are loaded into the interactive environment
[英]Interactive python variables in a script
變量 a 和 b 需要在函數內部傳遞
a=10
b=20
def print_vals(a, b):
print(a)
print(b)
print_vals(a,b)
10
20
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.