The Python Oracle

How do I use a decimal step value for range()?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Melt

--

Chapters
00:00 Question
00:23 Accepted answer (Score 1183)
01:31 Answer 2 (Score 290)
01:58 Answer 3 (Score 157)
02:23 Answer 4 (Score 36)
02:48 Thank you

--

Full question
https://stackoverflow.com/questions/4774...

Accepted answer links:
[linspace]: https://docs.scipy.org/doc/numpy/referen...
[NumPy]: http://en.wikipedia.org/wiki/NumPy

Answer 2 links:
[range()]: https://docs.python.org/3/library/functi...
[list comprehension]: https://docs.python.org/3/tutorial/datas...
[generator]: https://docs.python.org/3/howto/function...

Answer 3 links:
['xrange([start], stop[, step])']: http://docs.python.org/library/functions...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #floatingpoint #range

#avk47