diff --git a/docs/python/10if/_samples/max.ipynb b/docs/python/10if/_samples/max.ipynb index 802ec9a1f..f936f361f 100644 --- a/docs/python/10if/_samples/max.ipynb +++ b/docs/python/10if/_samples/max.ipynb @@ -8,11 +8,9 @@ "source": [ "def max(scores):\n", " m = scores[0]\n", - " for i in range(len(scores) - 1):\n", - " if scores[i] > scores[i + 1]:\n", + " for i in range(len(scores)):\n", + " if m < scores[i]:\n", " m = scores[i]\n", - " else:\n", - " m = scores[i + 1]\n", " return m\n", "\n", "\n",