why static kwyword not in python

Solutions on MaxInterview for why static kwyword not in python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "why static kwyword not in python"
Marwan
16 Jun 2017
1Variables declared inside the class definition, but not inside a method are class or static variables:
2
3>>> class MyClass:
4...     i = 3
5...
6>>> MyClass.i
73 
8As @millerdev points out, this creates a class-level i variable, but this is distinct from any instance-level i variable, so you could have
9
10>>> m = MyClass()
11>>> m.i = 4
12>>> MyClass.i, m.i
13>>> (3, 4)