[Tutor] Need help

niraj pandey nirajkumarpandey at gmail.com
Wed Sep 28 01:22:44 EDT 2016


Hi,

I am new in python. Could you guys please help me to short this code ?

Want to write this iteration (Yellow one) using loop.

r = 0
L1 = Label(bg = 'orange', text="Flat_No", relief=RIDGE,width=30)
L1.grid(row=0,column=0)
E1 = Entry(relief=SUNKEN,width=30)
E1.grid(row=0,column=1)
L2 = Label(bg = 'orange', text="Mains Unit", relief=RIDGE,width=30)
L2.grid(row=1,column=0)
E2 = Entry(relief=SUNKEN,width=30)
E2.grid(row=1,column=1)
L3 = Label(bg = 'orange', text="DG Unit", relief=RIDGE,width=30)
L3.grid(row=2,column=0)
E3 = Entry(relief=SUNKEN,width=30)
E3.grid(row=2,column=1)
L4 = Label(bg = 'orange', text="Month", relief=RIDGE,width=30)
L4.grid(row=3,column=0)
E4 = Entry(relief=SUNKEN,width=30)
E4.grid(row=3,column=1)


MyButton1 = Button(top, text="Submit", width=10, bg='red', command=lambda:
database.data(E1.get(), E2.get(), E3.get(), E4.get()))
MyButton1.grid(row=8, column=1)

The output should be like this :

[image: Inline image 1]

Thanks
Niraj
-- 
Success occurs when opportunity and preparation meet


More information about the Tutor mailing list