Can I link tkinter button to if statement?

I’m writing a code and this is the first time I use tkinter so I’m still learning, but I basically have a function that I have linked to a tkinter button and it works fine, but I want to add conditions using an if statement and whenever I do that it doesn’t give me an error but it just doesn’t output the word that it’s supposed to the GUI.

Thank you in advance.