Reload a module while preserving it's variables

前端 未结 0 1471
广开言路
广开言路 2021-02-11 01:05

Suppose I have two modules, x and y.

x:

import random
a = []
a.append(random.randint(1,100)

y:

from importlib import reload         


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