{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "23e48312",
   "metadata": {},
   "source": [
    "# 11-02 · Sekatory list\n",
    "\n",
    "Praktyka do sekcji [„Robienie kawałka listy!”"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7dc5d533",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Opanuj wycinki list."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9114cbb4",
   "metadata": {},
   "source": [
    "## Sprawa robocza"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "9f172e95",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-17T14:44:18.967869Z",
     "iopub.status.busy": "2026-08-17T14:44:18.967757Z",
     "iopub.status.idle": "2026-08-17T14:44:18.988808Z",
     "shell.execute_reply": "2026-08-17T14:44:18.988411Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[20, 30]\n",
      "[10, 20]\n",
      "[30, 40, 50]\n",
      "[50, 40, 30, 20, 10]\n"
     ]
    }
   ],
   "source": [
    "chisla = [10, 20, 30, 40, 50]\n",
    "print(chisla[1:3])\n",
    "print(chisla[:2])\n",
    "print(chisla[2:])\n",
    "print(chisla[::-1])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "de13cea3",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Wykreśl trzy środkowe liczby z listy `[1, 2, 3, 4, 5, 6, 7]`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "2f95e585",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-17T14:44:18.989952Z",
     "iopub.status.busy": "2026-08-17T14:44:18.989835Z",
     "iopub.status.idle": "2026-08-17T14:44:18.992183Z",
     "shell.execute_reply": "2026-08-17T14:44:18.991655Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[3, 4, 5]\n"
     ]
    }
   ],
   "source": [
    "numbers = [1, 2, 3, 4, 5, 6, 7]\n",
    "print(numbers[2:5])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1b244676",
   "metadata": {},
   "source": [
    "## Sprawdzenie wyniku"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "17c5b2cf",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-17T14:44:18.993783Z",
     "iopub.status.busy": "2026-08-17T14:44:18.993651Z",
     "iopub.status.idle": "2026-08-17T14:44:19.005901Z",
     "shell.execute_reply": "2026-08-17T14:44:19.005556Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Верно.\n"
     ]
    }
   ],
   "source": [
    "assert [1,2,3,4,5,6,7][2:5] == [3, 4, 5]\n",
    "print(\"Верно.\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Cartesian Python 3.14",
   "language": "python",
   "name": "cartesian-python314"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.14.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
