import statistics audio = [10, 2, 100, 3, 8, 10, 7] k = 3 start = 1 total = audio[start:start+k] median_val = statistics.median(total) audio[k-1] = median_val print(audio)
To embed this project on your website, copy the following code and paste it into your website's HTML: