You've already forked Curso-lenguaje-python
Restructure content and add notes from HolaMundo
Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
This commit is contained in:
17
python-total/dia_04/06_rango.py
Normal file
17
python-total/dia_04/06_rango.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Rango
|
||||
"""
|
||||
|
||||
# lista = [1,2,3,4,5]
|
||||
|
||||
# Puedes evitar las listas de numeros con range
|
||||
for numero in range(5):
|
||||
print(numero)
|
||||
|
||||
# Puedes decir el inicio, el final y los saltos
|
||||
for numero in range(10,100,10):
|
||||
print(numero)
|
||||
|
||||
# Se puede meter en listas
|
||||
lista = list(range(1,101))
|
||||
print(lista)
|
||||
Reference in New Issue
Block a user