On 27/02/17 03:06, Pooja Bhalode wrote: > for i in range(len(checkboxVars)): > if checkboxVars[i].get() == 1: > print checkboxVars[i] > selectedparam.append(checkboxVars[i])
As a point of Pythonic style this would be better written (and easier to read) as for var in checkboxVars: if var.get() == 1: print var.get() selectedparam.append(var) -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor