I have a Python file with a function where I generate a list. This list will be used in other Python files. I'm doing it by importing the Python function that generates the list.
How do I load the list in the other files?
Python code that generates the list:
def elementID (my_list):
input_file_path = "archivo.txt"
my_list = []
with open(input_file_path, "r") as in_file:
for line in in_file:
str = line.strip()
my_list.append(str)