is there a way to define a value within a class in the __init__
part, send it to some variable outside of the class without calling another function within the class?
like
class c:
def __init__(self, a):
self.a = a
b = 4 # do something like this so that outside of class c,
# b is set to 4 automatically for the entire program
# when i use class c
def function(self):
... # whatever. this doesnt matter
i have multiple classes that have different values for b. i could just make a list that tells the computer to change b, but i would rather set b within each class