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