Внедрите оператор return, как показано ниже! Вы должны быть хорошими. Надеюсь, это поможет кому-то ...
class Example(object):
def the_example(self):
itsProblem = "problem"
return itsProblem
theExample = Example()
print theExample.the_example()