You can't draw circle with tkinter directly so "Monkey patching" trick can help you and here is the modified code:
import tkinter as tk
top = tk.Tk()
C = tk.Canvas(top, bg="black", height=200, width=200)
C.grid()
def _create_circle(self, x, y, r, **kwargs):
return self.create_oval(x-r, y-r, x+r, y+r, **kwargs)
tk.Canvas.create_circle = _create_circle
def _create_circle_arc(self, x, y, r, **kwargs):
if "start" in kwargs and "end" in kwargs:
kwargs["extent"] = kwargs["end"] - kwargs["start"]
del kwargs["end"]
return self.create_arc(x-r, y-r, x+r, y+r, **kwargs)
tk.Canvas.create_circle_arc = _create_circle_arc
C.create_circle(100, 120, 50, fill="blue", outline="#DDD", width=4)
C.create_circle_arc(100, 120, 48, fill="green", outline="", start=45, end=140)
C.create_circle_arc(100, 120, 48, fill="green", outline="", start=275, end=305)
C.create_circle_arc(100, 120, 45, style="arc", outline="white", width=6, start=270-25, end=270+25)
C.create_circle(150, 40, 20, fill="#BBB", outline="")
top.wm_title("Circles and Arcs")
top.mainloop()
You can check this answer for more clarification