def countValuesInRange(lst, from_, to_):
count = 0
size = len(lst)
for i in range(size):
if lst[i] >= from_ and lst[i] <= to_:
count += 1
return count
lst = [ 3, 6, 0, 17, 9, 1, 8, 7, 4, 10, 18, 11, 20, 30 ]
from_ = 5
to_ = 12
print(countValuesInRange(lst, from_, to_))
'''
run:
6
'''