title: read data from file into dictionaries
body: <p>Lets say that i have a file containing information in each line and each line i want to convert in a dictionary. In the dictionary there will be one string, two integers and two lists. kinda like this:
      Q1 =  { "string" : "name", 
              "integer1" : 1, 
              "integer2" : 2, 
              "list1" : [a,b,c,d], 
              "list2": []
      }
  Now the file could be a txt file or not. Lets say its a txt file and every line would provide a dictionary. I am the one to write the file so I can have it in any format i want. I thought this format for each line of the file.txt:
  name,1,2,(a/b/c), ()
  so the first thing is the string, the second is integer1, then integer2, list1 and list2. Each element of the dictionary separated with a comma and the elements of the lists inside parenthesis and separated with a slash ("/"). Obviously if you think there is a better idea for how the file.txt should like please let me know :)
  the first list i want it to be dynamic. that means some lines may contain more characters inside the parenthesis () and the second list i want it to always be empty cause i am putting things there later in my code.
  Each line is a dictionary and each dictionary is an element in a list i want to create. So i want to have a list of dictionaries.</p>
  
  <p>I tried to open a file and play with the split function but the format of the txt file is more complicated than i thought and never got to read the file and save it into a list of dictionaries</p>
  
  <pre><code>#the file.txt should look like this:
  name1,5,6,(a1/a2/a3), ()
  name2,7,8,(a2/a3/a4/a5), ()
  
  #the python code i tried:
  def init():
      myList=[]
      with open("file.txt") as f:
          for line in f:
              d={}
              d = dict(line.strip().split(',', 4))
              myList[line]=d
  return(myList)        
  
  list=[]
  list=init();
  </code></pre>