title: store list names inside a list in Python
body: <p>How can I store list names inside a list in Python?</p>
  
  <p>I have six lists that I need to combine into one big list. If any list from six lists is empty then I want to add empty brackets "()" to this final big list to indicate an empty list.</p>
  
  <p>Here is what I tried but it didn't work as I stored list names as strings inside a masterList,</p>
  
  <pre><code>masterList=["primaryP","primaryG","primaryAin","primaryAout","primaryDin","primaryDout"]
  
  
  primaryP=['VDD']
  primaryG=['VSS']
  primaryAin=[]
  primaryAout=[]
  primaryDin=['A', 'X', 'M', 'SEL']
  primaryDout=['Y']
  
  for item in masterList:
      if item==[] :
          item=["()"]
      else:
          item=' '.join(item)
          item=[item]
  
  CSRPGPrimary=primaryP+primaryG+primaryAin+primaryAout+primaryDin+primaryDout
  
  print("CSRPGPrimary=", CSRPGPrimary)
  </code></pre>
  
  <p>This produces below output:</p>
  
  <pre><code>('CSRPGPrimary=', '//PG PRIMARY ("VDD") ("VSS") ("A") ("X") ("M") ("SEL") ("Y")')
  </code></pre>
  
  <p>However, output I want is </p>
  
  <pre><code>('CSRPGPrimary=', '//PG PRIMARY ("VDD") ("VSS") () () ("A X M SEL") ("Y")'
  </code></pre>
  
  <p>any inputs?</p>