>>> names=[\'jill\',\'jack\']
>>> isinstance(names,list)
Traceback (most recent call last):
File \"\", line 1, in
Apply this one :
if isinstance(names, type(list)):
But this works in Python (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32:
>>> names=['jill', 'jack']
>>> isinstance(names, list)
True
You've stomped on list
by assigning to a local variable of the same name. Don't do that.