私は2つのスクリプトを持っています。スクリプト A には、スクリプト B で定義する必要がある、変数を含む一連の関数があります。
たとえば、これは基本的にスクリプト A と B で行う必要があることです。
A.py:
health = {p1:"100", p2:"100"}
スクリプトの残りの部分では、その辞書を定義する必要があります。
B.py:
p1 = raw_input()
p2 = raw_input()
from A.py import *
#Here, I get the error that p1 and p2 aren't defined in A.py
#I need to pass p1 and p2 (in B.py) to the health dict in A.py
インポートされたスクリプトに引数変数を渡すにはどうすればよいですか?