import tkinter as tk
a = "hi"
print(a)
a1 = tk.StringVar()
a1.set("Hi")
print(a1)
Run Code Online (Sandbox Code Playgroud)
hi ##(Output from first print function)
AttributeError: 'NoneType' object has no attribute '_root' (Output from second print function)
Run Code Online (Sandbox Code Playgroud)
是什么区别a,并a1在上面的代码及其使用情况。为什么a1给出错误?