from tkinter import *
root = Tk()
root.title("Sorting Algorithm Visualiser")
root.geometry("1500x780+0+0")
root.config(bg="#D7DBDD")
canvas
canvas = Canvas(root, width=1000, height=500, bg="#F8F9F9").pack()
rectangle on canvas what is error here
canvas.create_rectangle(50, 25, 150, 75, fill="red")
root.mainloop()
*Traceback (most recent call last): File "C:/Users/VINAYAK/PycharmProjects/try/try o1.py", line 10, in canvas.create_rectangle(50, 25, 150, 75, fill="red") AttributeError: 'NoneType' object has no attribute 'create_rectangle'
Process finished with exit code 1*