In this particular case, it seems that (width,height) looks nicer. But I think otherwise, list constuct is easier to read, even though it is supposed to be slower.
With list you can : [a] + [ x for x in something ] With tuple it looks like this : (a,) + tuple(x for x in something) I think the list looks cleaner. And since you cannot concat tuple with list, I think unless it looks obvious and natural(as in your case), use list. Xah Lee wrote: > suppose i'm going to have a data structure like this: > > [ > [imgFullPath,(width, height)], > [imgFullPath,(width, height)], > [imgFullPath,(width, height)], > [imgFullPath,(width, height)], > ... > ] > > should i use (width,height) or [width,height]? > what advantage i get to use n-tuple instead of the generic list? > > Thanks. > > Xah > [EMAIL PROTECTED] > ∑ http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list