type() and isinstance()
- float/int/str(variable): cambia el tipo de data/type
- type(variable) devuelve la clase de dato u objeto, class 'float/int/str'
- isinstance(variable, float/int/str): comprobar el tipo de dato (devuelve True/False)
Fuente: Coursera & Google 3. Loops with multiple range parameters # Use a for loop to calculate 9! product = 1 for n in range ( 1...
No hay comentarios.:
Publicar un comentario