title: what is the difference between a variable and StringVar() of tkinter
body: <h1>Code:</h1>
  <pre><code>import tkinter as tk
  a = &quot;hi&quot;
  print(a)
  a1 = tk.StringVar()
  a1.set(&quot;Hi&quot;)
  print(a1)
  </code></pre>
  <h1>Output:</h1>
  <pre><code>hi ##(Output from first print function) 
  
  AttributeError: 'NoneType' object has no attribute '_root' (Output from second print function) 
  </code></pre>
  <h1>My question:</h1>
  <p>What is the difference between <code>a</code> and <code>a1</code> in above code and their use-cases. Why <code>a1</code> is giving error?</p>