📅  最后修改于: 2022-03-11 14:46:17.343000             🧑  作者: Mango
#You have to return something in a function to have it in a variable.
def ex_one():
print('Hi!')
#This won't work.
def ex_two():
msg = 'Hi!'
return msg
#This will work.
var = ex_two