Ken Seehof wrote: > The compare is a tiny bit slower, but looks nicer (I think). > > >>> a = [2,3,4] > >>> b = "3,4,5" > >>> def foo(x): > ... if type(x) == type([]): # just use type() with a literal for extra guru points, use "if type(x) is type([])" (there's only one type object for each type), or better: if isinstance(x, type([])): .... Cheers /F