Advertisement
NubeColectiva

Imprimir Carácteres Especiales en la Terminal en Python

Aug 18th, 2023 (edited)
1,053
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. # Soporte para imprimir carácteres especiales
  2. import sys
  3. sys.stdout.reconfigure(encoding='utf-8')
  4.  
  5. # Variable saludo
  6. saludo = "Feliz Año Nuevo";
  7.  
  8. # Función mostrarSaludo()
  9. def mostrarSaludo(saludo):
  10.  
  11.     # Mostramos el saludo
  12.     print(saludo)
  13.  
  14. # Llamamos a la función para mostrar el saludo
  15. mostrarSaludo(saludo)
  16.  
  17.  
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement