title: How do I write triangle functions that reads data from a list from a seperate python file?
body: <p>I am working on a program that has 3 separate python files. My EWGetdata.py file that reads input from a .txt file and puts it into a list of lists. Then I have a EWtriFun.py file that calculates functions of the triangles from the input file. How can I use the data from the list of lists I made in the EWGetdata.py file in the EWtrifun.py file? </p>
  
  <p>This is my EWGetdata.py</p>
  
  <pre><code>def getData():
  inFile = open("input5.txt", "r")
  
  names = []
  vertices = []
  my_list = []
  for line in inFile:
      line = line.split()
  
      name = line[0]
      x1 = line[1]
      y1 = line[2]
      x2 = line[3]
      y2 = line[4]
      x3 = line[5]
      y3 = line[6]
  
      names.append(name)
      vertices.append([[x1,y1],[x2,y2],[x3,y3]])
  
  my_list.append(names)
  my_list.append(vertices)
  inFile.close()
  
  return(my_list)
  getData()
  </code></pre>
  
  <p>This is my Function File so far</p>
  
  <pre><code>import EWgetData
  
  local_lst = EWgetData.my_list
  </code></pre>
  
  <p>I get the error AttributeError: module 'EWgetData' has no attribute 'my_list'</p>