<jupyter_start><jupyter_text><jupyter_code>veri1 = [[1,'a',['cat'],2],[[[3]],'dog'],4,5]



def flattenf(List1):
    newList = []
    for i in List1:
        if type(i) != type([]):
            newList.append(i)
        else:
            newList.extend(flattenf(i))
    return newList
flattenf(veri1)
# soru 2 
veri2= [[1, 2], [3, 4], [5, 6, 7]]
def rever(List2):
  for i in List2:
    List2.reverse()
    return List2
rever(veri2)<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup