📅  最后修改于: 2022-03-11 14:46:22.486000             🧑  作者: Mango
$ cat first.py second.py
#first.py
def demo():
some_list = []
for i in 'string':
some_list.append( i )
return some_list
#second.py
from first import demo
some_list = demo()
print some_list
$python second.py
['s', 't', 'r', 'i', 'n', 'g']