from tkinter import *
import random
#create a window screen
win=Tk()
win.geometry("500x400")
canvas=Canvas(win,bg="white",height=400,width=500)
canvas.place(x=0,y=0)
#create three lines at different x,y coordinate
for i in range(100):
x1=random.randint(50,350)
y1=random.randint(50,350)
x2=random.randint(50,350)
y2=random.randint(50,350)
canvas.create_line(x1,y1,x2,y2)
#hold the screen
win.mainloop()