Leandro Ardissone 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..


You shouldn't enclose "list" inside quotes.
This is the correct way:

if type(artistList) == list:
    do something...

or as someone suggested:

if isinstance(l, list):
        do something...


hope this helps.
Luis

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to