wish help you to fix your issue I'd start with a list of the checkpoints and some threshold for "near" (either at the top level or paired with each checkpoint if "near" varies for each checkpoint). You can take advantage of the data and checkpoints being sorted in the same order by only ever considering the first checkpoint in the list and popping it off the list when you get a hit:
checkpoints = [.25, .5. .75]
for i in list_of_floats:
if abs(i - checkpoints) < .1:
if not checkpoints:
around this issue Since you are binding all combo boxes to the same data source - a single list - they are using a single BindingManagerBase. So when you choose an item from one of combo boxes, the current Position of the shared binding manager base changes and all combo boxes goes to that position of their shared data source.
may help you . I would like to write functions that work with single element or list as argument. I would prefer not to use isinstance to check the type of the argument. How do I put a single element into a list, and don't convert already existing list to list of list? , Use exceptions: