I would like to loop the nest list ['sally','joe'] in the example shown below.
data = ['joe','mike',['sally','joe'],'phil']
I attempted the following:
for i in data:
for j in (i):
if type(j) == '<class '+"'list'>":
print(j)
['sally','joe']or is itjoe mike sally joe phil(with newlines between)?