I am curious to know can we define a variable without initialising it.
class A:
a
obj=A()
obj.a=8
It throw NameError: name 'a' is not defined
Although i have defined variable a
, but haven't initialised.
Out of static/class variable and instance variable scope i want to know this,
as i am learning python