how can i create 50 apples at different positions on screen without having to each time call the constructor 50 times?
import Tkinter as tk
from Tkinter import *
import time
class Apple(object):
def __init__(self, a,b,c,d):
self.rect = canvas.create_oval(a,b,c,d)
root=tk.Tk()
canvas = tk.Canvas(root, width=300, height=300, bg="#FFFFFF")
canvas.pack()
for x in range (0,50):
apple="apple"+ str(x)
#apple=Fruit(60,60,80,80)
root.mainloop()