I have an a.py file, which stores multiple list inside.
total_list = 2
a0 = ['example_string','example_string2']
a1 = ['example_string4','example_string3']
and I have a b.py which will read the list fron a.py. I want to do something like this which is able to loop to get each of the lists in a.py.
import a
for i in range(a.total_list):
steps = "\n".join(a.a+str(i))
print(steps)
and I get this error
AttributeError: module 'a' has no attribute 'a'
I had tried the globa() and local() methods but it is not working.