<pre><code># module1.py
question = "What is the meaning of life, the Universe, and everything?"
answer = 42
# module2.py
question = "What is your quest?"
answer = "To seek the holy grail."
>>> import module1
>>> import module2
>>> print module1.question
What is the meaning of life, the Universe, and everything?
>>> print module2.question
What is your quest?
>>> print module1.answer
42
>>> print module2.answer
To seek the holy grail.
</code></pre>
<p>如果我们使用from module1 import*和from module2 import*,则会出现命名冲突,无法访问来自module1的问题和答案。为什么会这样?你知道吗</p>