Hi there,
how can I check if a variable is a structure (i.e. a list)? For my
special problem the variable is either a character string OR a list of
character strings line ['word1', 'word2',...]
So how can I test if a variable 'a' is either a single character string
or a list? I tried:
if a is list:
but that does not work. I also looked in the tutorial and used google
to find an answer, but I did not.
Has anyone an idea about that?
Alex
how can I check if a variable is a structure (i.e. a list)? For my
special problem the variable is either a character string OR a list of
character strings line ['word1', 'word2',...]
So how can I test if a variable 'a' is either a single character string
or a list? I tried:
if a is list:
but that does not work. I also looked in the tutorial and used google
to find an answer, but I did not.
Has anyone an idea about that?
Alex
Comment