I have a reference list of tuple
ref_list = [(31, 38), (56, 61)]
which inputs are given like below
input ----> [(24, 29)] output----> (31,38)
input ----> [(74, 82)] output----> None
input ----> [(49, 55)] output----> (56,71)
How is it possible to find the tuple from a list which has difference between first element of reference tuple and second element in the input tuple by one or two ?