代码:a = "hi"a1 = tk.StringVar()print(a1)hi ##(OutputAttributeError: 'NoneType' object has no attribute '_root' (Output from second print function) 上面代码中的a和a1有什么不同以及它们
在普通的Python 3.4中,如果你想在字符串中间打印一个变量,你可以这样做:print("The value of x is %s" % (x))
它将打印The value of在Tkinter中,如果你想让标签读取某个变量,你只需定义标签,如果标签的变量在任何时候发生变化,如果是Tkinter标签,<e