I'm learning python and starting learning list comprehension. I though I would create a quick list from 1 to 50 in .1 increments to test logic etc and notice when I run the program the output is as sh
I'm learning python and starting learning list comprehension. I though I would create a quick list from 1 to 50 in .1 increments to test logic etc and notice when I run the program the output is as shown below. My question is why am I not just getting .3. Which would be the next number in the sequence
To get the output I want would I have to use a rounding function? Or limit the value to one place.