Update global variable through function bound with 'on_click'

…I could pack everything into a class like so:

class MyApplication:
    def __init__(self):
        self.my_list = []

    def create_list(self, event):
        self.my_list = [1, 2, 3, 4, 5]
        print(self.my_list)

    def modify_list(self, event):
        self.my_list.append(6)
        print(self.my_list)

and then call the class methods from on_click()… is this the best way to go?

Edit: It does seem that “throwing everything into a single class” is a popular solution:

What is not quite clear to me is the point in making all objects in the class params instead of instance variables?