Use return
and call server
from within create_csv
. This may necessitate feeding id_
to create_csv
, but this is likely reasonable, as presumably dictionary1
is constructed based on id_
.
def server(id_):
# some code to construct dictionary1
return dictionary1
def create_csv(id_):
my_dict = server(id_)
# export to csv here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…