Created
June 12, 2018 12:53
-
-
Save Fhernd/ecd2c01bcf4cc150b7d272076935899e to your computer and use it in GitHub Desktop.
Creación de patrón iteración personalizado. OrtizOL.
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
def generar_rango_flotante(inicio, fin, incremento): | |
x = inicio | |
while x < fin: | |
yield x | |
x += incremento | |
for n in generar_rango_flotante(0, 4, 0.5): | |
print(n) | |
L = list(generar_rango_flotante(0, 1, 0.3)) | |
print(L) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment