Every line of 'list average python' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
104 def test_averageOnList(self): 105 items = [0, 8, 4, 10] 106 res = BlocklyMethods.averageOnList(items) 107 self.assertEqual(5.5, res)
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
59 def average(average_window, data): 60 window = [] 61 newdata = [] 62 for v in data: 63 window.append(v) 64 if len(window) == average_window: 65 newdata.append(sum(window)/average_window) 66 del window[0] 67 return newdata