On 6 June 2014 23:49, Ricordisamoa ricordisamoa@openmailbox.org wrote:
Should we always use tuples when instantiating them only once? E.g. *if* abc *in* ('e', 'f'): instead of *if* abc *in* ['e', 'f']:
Performance-wise, I don't think it matters much; after all, most time is spent inside the loop, not in instantiating a list or tuple. Conceptually, a list often makes more sense (a list would be different items of the same type, while a tuple represents different properties of the same item).
Merlijn