Deducing statement for a given output


#1

Given a class definition

class Xander:
    def __init__(self, x, y):
        self.a = x
        self.b = y

    def __str__(self):
        return "{}, {}".format(self.a, self.b)

    def Bethoven(self):
        lullaby = self.a
        self.a = self.b + self.a + self.a + self.b
        self.b = lullaby + self.b + self.b + lullaby 

and a function:

def music(obj):
    obj.Bethoven()
    print(obj)

How can we write a python statement that gives the following output:
xyyx, yxxy


#2

Is this a trick question, or just generous teacher’s assignment?

>>> obj = Xander('y','x')
>>> music(obj)
xyyx, yxxy
>>> 

#3

Hello. Yeah, it is a trick question given to us by our teacher. It drove me nuts. By the way, I did figure out the answer. Thank you @mtf