On 29 Nov 2006 08:25:35 -0800, "Leandro Ardissone" <[EMAIL PROTECTED]> wrote:
>great, thanks > >And how I can compare this "<type 'str'>" output ? >I want to decide what to do if the var is an string and what to do if >not.. > >Tried with: >if type(artistList) == "<type 'list'>": > >and >if type(artistList) == "list": > >but nothing.. Try it this way... >>> artistList = [] >>> isinstance(artistList, list) True >>> if isinstance(artistList, list): print "I'm a list." I'm a list. >>> Daniel Klein -- http://mail.python.org/mailman/listinfo/python-list