how to access attributes of a class in python code example
Example: python get attributes of class
import inspect
class myclass:
a = 5
def method(b):
return b
for i in inspect.getmembers(myclass):
print(i)
import inspect
class myclass:
a = 5
def method(b):
return b
for i in inspect.getmembers(myclass):
print(i)