<jupyter_start><jupyter_text><jupyter_code>class Stack:
  def __init__ (self):
    self.__datos = []
  
  def is_empty (self) :
    return len(self.__datos) == 0

  def get_top (self):
    return self.__datos[-1]

  def pop (self):
    return self.__datos.pop()

  def push (self , valor):
    self.__datos.append(valor)

  def get_length (self):
    return len(self.__datos)

  def to_string (self):
    for ele in self.__datos:
      print ("-----------------")
      print (f" (ele) ")
      print ("-----------------\n")


pila1 = Stack()
pila1.push (10)
pila1.push (20)
pila1.push (1)
pila1.push (393)
pila1.push (103)
pila1.to_string() 

sacado = pila1.pop()
print(sacado)
pila1.to_string()

pila1.push(444)
pila1.push(233)
pila1.to_string

print(f"El elemento en el tope es:{ pila1.get_top() } ")
pila1.to_string()
print(f"La pila tiene {pila1.get_length()} elementos")
print(f"¿La pila esta vacía?: { pila1.is_empty() } ")<jupyter_output>-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

103
-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

El elemento en el tope es:233 
-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

-----------------
 (ele) 
-----------------

La pila tiene 6 elementos
¿La pila esta vacía?: False
{'fraction_non_alphanumeric': 0.4218841427735518, 'fraction_numerical': 0.024575775307197192, 'mean_word_length': 1.0165094339622642, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '268090', 'license': 'MIT', 'n_tokens_mistral': 593, 'n_tokens_neox': 567, 'n_words': 116, 'path': '5Ooctubre.ipynb', 'repo_name': 'VxctxrTL/daa_2021_1', 'size': '1709'}