Hi!
How can I check if some list is nested?
I have a list:
then I make a change:
Now I have nested list:
When I want to loop through mylist and print it, I need to check somehow if some list index is nested or not because if yes, printing will be different for nested indexes.
Thanks.
Bosko
How can I check if some list is nested?
I have a list:
Code:
mylist = ['a', 'b', 'c']
Code:
mylist[0] = ('a1', 'a2')
Code:
[('a1', 'a2'),'b', 'c']
Thanks.
Bosko