from tkinter import *
import pygame
window = Tk()
window.geometry("600x600") # size of window
window.title("BAJDJ")
window.config(bg="red")
label = Label(window, text="Crab")
label.pack()
window.mainloop()
this code runs normally on debug mode but when run regularly comes back with a syntax error, if I run it in the default python ide the first line highlights in red and says it tries to compile multiple lines in one line and can’t. The error only occurred when I added the “Label” code but if I remove it, the error doesn’t go away
New contributor
user22436820 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2