Extracting a selection based on conditions

Thanks for your help so far. Is there a simple way to extract all points a certain distance range from another point? like from 0,0,0. The closest seems to be a manually used ruler but theres no relevant examples of use I can find. Doing it with simple python code doesn’t seem to work either.