How to create a static variable in python? 
我在python中搜索了很多静态变量,但找不到直接的答案。. 就像Java中有一个定义为类中的静态变量一样,Python也可以这样做吗?
		
		
-     你定义的变量的类。注意,Python的支持面向对象的概念:对象,但冰槽。它是多范例。   
 
-    stackoverflow.com / / / 4278756 68672  
 
 
	  
 
如何
1 2
   | class A(object): 
    v = 123  | 
 
你只需
对于使用静态变量,必须在类内使用它。
1 2 3 4 5
   |  class XYZ: 
     value = 3 
 
 
 print(MyClass.value) //  access it via class name  |