tol = 5
c = [5, 15, 25]
value = []
for i in c:
    getdatas = df.where((df['a'] >= i - tol) & (df['a'] <= i + tol)).dropna()[
        'a'].values
value.append([x for x in getdatas])
print(value)
Python: Iterate over a data frame column, check for a condition-value stored in array, and get the values to a list