Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created February 3, 2018 12:02
Show Gist options
  • Save Fhernd/dc518e46827c95a6a8c9238191177087 to your computer and use it in GitHub Desktop.
Save Fhernd/dc518e46827c95a6a8c9238191177087 to your computer and use it in GitHub Desktop.
Consultar el tipo de dato en Python.
valor_1 = 7
print(type(valor_1))
valor_2 = 'Dostoevsky'
print(type(valor_2))
# Comprueba si un valor es de una instancia
# particular:
print(isinstance(valor_2, str))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment