so im working on a small project in and im trying to get input from the user using the entry widget and then comparing and seeing if any of the words in the input matches one or more of the words inside a list , for some reason it dosent work and the program dosent read and trying to match and instad jumps straight into showing the lable that it shouldve print only if one of the words matches :
e = Entry(window, width=40, borderwidth=3, font='Arial 20')
e.place(rely=0.2, relx=0.24)
r1 = Label(window, text="good", font='Arial 20')
def s_command():
x = ["egg","milk","rice","salt"]
s_input = e.get().split(" ")
for s_input in x:
r1.pack()
S_button = Button(window, text="Search", font='Arial 22', width=8, command=s_command)
S_button.place(rely=0.25, relx=0.4)