I've made a class with some variables being set in the ___init____ and I want to be able to change these variables from methods in that class ie.
class example_class:
def __init__(self, variable):
self.thing = 'variable'
def example_method(self):
self.thing = 'changed text'
def different_method(self):
print(self.thing)
So before calling "example_method" the value of self.thing is the string 'variable' and then after calling the method "example_method" self.thing now equals 'changed text'. This must be possible but I don't understand how to do it