So I am having a problem with printing certain values that fall within a certain range from a list
Here is the code
import statistics as st
players = [180, 172, 178, 185, 190, 195, 192, 200, 210, 190]
players.sort()
avg = sum(players)/ len(players)
std = st.stdev(players)
low = avg - std
high = avg + std
for i in range (int(low), int(high)):
print(players[i])
It is giving me this error
Traceback (most recent call last):
File "file0.py", line 16, in <module>
print(players[i])
IndexError: list index out of range
Thank you