📜  赋值前引用的变量python代码示例

📅  最后修改于: 2022-03-11 14:47:14.629000             🧑  作者: Mango

代码示例2
# When Python parses the body of a function definition and encounters an assignment such as

 feed = 5 
#Python interprets feed as a local variable by default. If you do not wish for it to be a local variable, you must put

global feed
feed = 5