-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy path00_helloworld.py
More file actions
40 lines (32 loc) · 850 Bytes
/
00_helloworld.py
File metadata and controls
40 lines (32 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Clase en vídeo: https://youtu.be/Kp4Mvapo5kc
### Hola Mundo ###
# Nuestro hola mundo en Python
print("Hola Python")
print('Hola Python')
# Esto es un comentario
"""
Este es un
comentario
en varias líneas
"""
'''
Este también es un
comentario
en varias líneas
'''
# Cómo consultar el tipo de dato
print(type("Soy un dato str")) # Tipo 'str'
print(type(5)) # Tipo 'int'
print(type(1.5)) # Tipo 'float'
print(type(3 + 1j)) # Tipo 'complex'
print(type(True)) # Tipo 'bool'
print(type([1, 2, 3])) # Tipo 'list'
print(type((1, 2, 3))) # Tipo 'tuple'
print(type(range(10)))
print(type(print("Mi cadena de texto"))) # Mi cadena de texto -> Tipo 'NoneType'
"""
Concatenación con f string
"""
variable = "Hola, soy una variable :)"
print(f"La variable te saluda: {variable}")
print(f"El tipo de dato de la variable es: {type(variable)}")