# feedback needed for my first python tkinter simple MVC, list element to print to label

Just starting to get the idea of MVC with tkinter. I wrote this simple program and I'm looking for feedback. There are no errors, but I don't know if I set it up right or not.

import tkinter as tk

class Model():

def __init__(self):
self.list = ["email", "sms", 'voice']

class View(tk.Frame):
def __init__(self, parent, controller):
self.controller = controller
tk.Frame.__init__(self, parent, bg="yellow", bd=2,
relief=tk.RIDGE)
self.parent = parent
self.pack()

self.labelVariable=tk.StringVar()
self.output=tk.Label(self, textvariable=self.labelVariable,
bg="orange", fg="white")
self.output.pack()

self.hello = tk.Button(self, text="Show", command=
self.controller.hello_Button_Pressed,  bd=2,
relief=tk.RIDGE)
self.hello.pack(side="left")

class Controller():
def __init__(self):
self.root = tk.Tk()
self.model = Model()
self.view = View(self.root, self)

self.root.title("MVC example")
self.root.geometry("250x350")
self.root.config(background="LightBlue4")
self.root.mainloop()

def hello_Button_Pressed(self):
self.view.labelVariable.set(self.model.list)

if __name__ == '__main__':
c = Controller()

• Welcome to Code Review. Can you tell us more about what the code is supposed to do? Does the code have a purpose? I understand you want to learn about MVC, that's your goal. What's the goal of the code? – Mast Dec 26 '19 at 8:57
• Hi @Mast, thanks for responding. This code is just to print the list onto the label. Nothing else. I could do this code without MVC, but to elevate my learning, i wanted to organize it with MVC. If this is correct, without much feedback, I will begin to rewrite most of my other programs into MVC, so any thoughts are welcomed. thanks again. – fishtang Dec 26 '19 at 9:19
• Please edit the question to add the purpose of the code there. In the comment it is not visible enough. – Roland Illig Feb 5 '20 at 1:09