in moduleA.py:
JavaScript
x
5
1
A = 1
2
B = 2
3
C = 3
4
D = 4
5
in moduleB.py, how can I achieve:
JavaScript
1
5
1
from moduleA import (A, B, C, D) as nums
2
3
for x in nums:
4
print(x)
5
Advertisement
Answer
You can’t do this the way you are trying to. You will need to find a different solution to your original problem.