Variable Size Sliding Window Algorithm Python Tutorial W3schools