def guardar_texto_en_fichero(texto, nombre_fichero): with open(nombre_fichero, 'w', encoding='utf-8') as archivo: archivo.write(texto)