Is there any range() function in python for float numbers for example
a=0.6 if a in range(0,1): a=3
How can i implement this?
If you're looking to check whether a is in between two numbers it's better to use: 0 <=a<=1 Otherwise , if you do need a list of say 0 to 1 in 0.1 jumps you can use this code to generate it: lst = map(lambda x: x/10.0, range(11))
0 <=a<=1
lst = map(lambda x: x/10.0, range(11))