Advertisement
Fhernd

consultar-tipo-datos.py

Feb 3rd, 2018
687
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. valor_1 = 7
  2.  
  3. print(type(valor_1))
  4.  
  5. valor_2 = 'Dostoevsky'
  6.  
  7. print(type(valor_2))
  8.  
  9. # Comprueba si un valor es de una instancia
  10. # particular:
  11. print(isinstance(valor_2, str))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement