How does Python know I want to double number I did not define? (Beginner)

前端 未结 0 733
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-21 05:52
x = 10
def double(y):
    return 2 * x
print(double(x))

Output is 20 As far as I know, it should return None because in function "double"

相关标签:
回答
  • 消灭零回复
提交回复
热议问题