Just a small question. I have a class that does something and handles strings. I have an active class that has a button which when pressed closes the screen and deactivates the class at the same time. I would like the class to return the strings it has been handling to variables that are outside the class itself., but I am not sure how to do this.
class InputBox:
def __init__(self, x, y, w, h, text=''):
#... Instructions for defining the class.
def Otherinstructions():
#... Other instructions
def returnVar(): # The function to return text externally.
return InputBox.text
NewVar = '' # I would like the class to return the string to this variable.
Thank you. I just want to find out the most effective way.