Hi, I need to create a function using recursion to find out if two lists have the same shape. For example, if nest1 = [4, [ [3,6], [] ,7] ,[8] ]
nest2 = [ [ [3] ] , 7 , [ [5 , [9 , 2] , [ [ [ [ [4] ] , 2 ] ] ] ] ] ]
nest3 = [ 5, [ [3,9], [] ,7] ,[2]
then
isomorphic ( nest1 , nest2 ) should yield False
isomorphic ( nest1 , nest3 ) should yield True
isomorphic ( nest2 , nest3 ) should yield False
How would you set this up?
Thanks!