标签: python python-3.6
我在python文件中有一个声明列表。
a = 1 b = 2 c = 3
我从另一个文件导入,并尝试对其进行迭代。
import themodule for key, value in themodule.__dict__.items(): if not key.startswith('_'): ...
但是,按声明的顺序获取声明至关重要。有什么办法可以保证吗?