Using Python 3.4 and I have a list which has numbers in it which have 8 decimal places or more (eg. -72.2373909452 and 175.33903215), and I need a way to separate them according to their number.
Original code looks like this:
for number in list:
range_list=[]
if number in range(x, y):
range_list.append(number)
but for obvious reasons it doesn't work and doesn't add any numbers to the new list.
I also thought about multiplying the number first and then just having the range numbers between factors of ten, but as the number of decimal places is different between each number that isn't practical.