Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created June 12, 2018 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/ecd2c01bcf4cc150b7d272076935899e to your computer and use it in GitHub Desktop.
Save Fhernd/ecd2c01bcf4cc150b7d272076935899e to your computer and use it in GitHub Desktop.
Creación de patrón iteración personalizado. OrtizOL.
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