title: How can i append Variable name (already created) to list?
body: <p>I have gone through almost all answers from stack but not found answer..
  Im making program to make sql insertion query..
  so i have:</p>
  
  <pre><code>a="Aadi Aarav Aarnav Aarush Aayush Abdul Abeer Abhimanyu Abhiramnew Aditya Advaith Advay Advik Agastya Akshay Amol Anay Anirudhnew Anmol Ansh ArinArjun Arnav Aryan Atharv Avi Ayaan Ayush Ayushman Azaan Azad Daksh Darsh Dev Dev Devansh Dhruv Farhan Gautam Harsh Harshil Hredhaan Isaac IshaanJainew Jason Kabir Kalpit Karan Kiaan Krish Krishna Laksh LakshayManannew Mohammed Nachiket Naksh Nakul Neel Om Parth Pranav PraneelPranit Pratyush Rachit Raghav Ranbir Ranveer Rayaan Rehaannew Reyansh Rishi Rohan Ronith Rudranew Rushil Ryan Sai Saksham Samaksh SamarSamarth Samesh Sarthak Sathviknew Shaurya Shivansh Siddharth Tejas Vedant Veer Viaannew Vihaan Viraj Vivaan Yash Yug Zayan"
  name=a.split(' ')
  location="Goregaon dadar andheri vileparle santacruz london usa newYork Malad Mulund VAshi Newzealand ".split(' ')
  grade="A B C D".split(' ')
  query=[]
  def generate(id):
      global query
      if id==1:
          query.append('[choice(name)]')
      elif id==2:
          query.append(',randint(35,99)')
      elif id==3:
          query.append(',choice(location)')
      elif id==4:
          query.append(',randint(25000,90000)')
      elif id==5:
          query.append(',choice(grade)')
      elif id==0:
          done()
  
  
  def done():
      for i in range(5):
           print((query))
          #Result.insert(END,)
  </code></pre>
  
  <p>The output is::</p>
  
  <pre><code>['[choice(name)]', ',randint(35,99)', ',choice(location)', ',choice(location)', ',randint(25000,90000)']
  ['[choice(name)]', ',randint(35,99)', ',choice(location)', ',choice(location)', ',randint(25000,90000)']
  ['[choice(name)]', ',randint(35,99)', ',choice(location)', ',choice(location)', ',randint(25000,90000)']
  ['[choice(name)]', ',randint(35,99)', ',choice(location)', ',choice(location)', ',randint(25000,90000)']
  ['[choice(name)]', ',randint(35,99)', ',choice(location)', ',choice(location)', ',randint(25000,90000)']
  </code></pre>
  
  <p><strong>But I wanted output is value of that variable like random name generated how can I</strong></p>
  
  <p>edit1:</p>
  
  <p>Guys my desired output is like this..</p>
  
  <pre><code>insert into student values (101, 'varun', 62, 'B', 'vashi') ;
  insert into student values (102, 'nana', 46, 'C', 'vashi') ;
  insert into student values (103, 'varun', 56, 'A', 'vashi') ;
  insert into student values (104, 'rajkumar', 81, 'D', 'vashi') ;
  insert into student values (105, 'varun', 73, 'A', 'malad') ;
  insert into student values (106, 'rajkumar', 49, 'A', 'vashi') ;
  insert into student values (107, 'rajkumar', 37, 'D', 'malad') ;
  insert into student values (108, 'deepika', 30, 'C', 'vashi') ;
  insert into student values (109, 'varun', 37, 'D', 'goregaon') ;
  </code></pre>
  
  <p>i have a gui program
  like this..<a href="https://i.stack.imgur.com/RLwIc.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>so the number of variables are not fixed/..
  when user click on the buttons it make  list of variables..
  in list
  then i want to iterate over this..
  hope u get my problem,,</p>