Tipos em Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on 18/04/2014 | |
@author: Samuel T. C. Santos | |
Como saber o tipo de uma variável em python. | |
''' | |
print type(4) | |
print type(3.445) | |
print type("Alo, mundo") | |
print type(['a','b','c']) | |
print type((1,3,4)) | |
print type({1:"a", 2:"b"}) | |
''' | |
Saida do Programa: | |
<type 'int'> | |
<type 'float'> | |
<type 'str'> | |
<type 'list'> | |
<type 'tuple'> | |
<type 'dict'> | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment