<jupyter_start><jupyter_text><jupyter_code>class  Array ( objeto ):

    def  __init__ ( self, n ):
        self.__n = n
        self.__array = [ 0  for  x  in range(self.__n)]

    def  to_string ( self ):
        print( "----" )
        print( self.__array )

    def  len ( yo ):
        return self.__n

    def  set_item ( self , index , valor ):
        if  self.__check_limits__(índice):
            self.__array[índice] = valor
        else :
            raise  Exception('Error de limites en index')

    def  get_item ( self , index ):
        return self.__array[índice]

    def  clear ( self , valor ):
        self.__array = [ valor  for  x  in range(self.__n)]

    def  __check_limits__ ( self , index ):
        return  index  > = 0  and  index  <  self.__n


class  Array2D :

    def  __init__ ( self , rows , cols , valor ):
        self. __cols  =  cols
        self.__rows  =  filas
        self.__array = [[ valor  for  x  in range( self.__cols )] for  y  in range( self.__rows)]

    def  to_string ( self ):
        [ print( "---" , end = "" ) for  x  in range(self.__cols)]
        print( "" )
        for  i  in self.__array:
            print( i )
        [ print( "---" , end = "" ) for  x  in range( self.__cols)]
        print( "" )

    def  get_num_rows ( self ):
        return self.__rows

    def  get_num_cols ( self ):
        return self.__cols

    def  get_item ( self , rows , cols ):
        return self.__array[rows][cols]

    def  set_item ( self , row , col , valor ):
        self.__array[fila][col] = valor

    def  clearing ( self , valor = 0 ):
        for  i  in range(self.__rows):
            for j  in range(self.__cols):
                self.__array[i][j] = valor

class  Array3D :
        def  __init__ ( self , depth , rows , cols , valor ):
            self.__depth = depth
            self.__cols = cols
            self.__rows = rows
            self.__array = [[[ valor  for  x  in range( self.__cols)] for  y  in range(self.__rows)] for  z  in range(self.__depth)]


        def  to_string ( self ):
            [ print( "---" , end = "" ) for  x  in range( self . __cols )]
            print( "" )
            dim  =  1
            for  d  self.__array :
                print( f "========= Atenuar { atenuar } ===========" )
                for  row  in  d :
                    print( row )
                tenue  + =  1
            [ print( "---" , end = "" ) for  x  in range(self.__cols)]
            print( "" )



        def  get_num_rows ( self ):
            return self.__rows

        def  get_num_cols ( self ):
            return self.__cols

        def  get_depth ( self ):
            return self.__depth

        def  get_item ( self , depth , row , col ):
            self.__array[depth][row][col]

        def  set_item ( self , depth , row , col , valor ):
            self.__array[depth][row][col] = valor

        def  clear ( self , valor = 0 ):
            for  i  in range(self.__depth ):
                for  j  in range(self.__rows):
                    for  k  in range(self.__cols):
                        self.set_item(depth , row , col , valor)<jupyter_output><empty_output>