I'm currently messing around with Python and grabbing variables from other Python files. So far I have:
FILE_1.py
data = [
["t1", "t2", "t3", "t4"],
["t5", "t6", "t7", "t8"]
]
FILE_2.py
from FILE_1 import data
# this only appends to the list imported into FILE_2, does not edit list in FILE_1.py
data.append(["t11","t22","t33","t44"])
Is there a way to append to list "data" in FILE_1? I've seen some solutions about using numpy or just organizing data in a .cvs, but I wish to avoid those and use this way if it is possible.
For clarification, there are no other methods in these files or processes to be run, nor are there any other variables/lists in FILE_1. I just want to save any value gathered in FILE_2 to the list in FILE_1.