{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "883a023d",
   "metadata": {},
   "source": [
    "# 08-20 · Debugowanie problemów z łańcuch znakówme\n",
    "\n",
    "Praktyka do sekcji [„Debugowanie problemów z łańcuch znakówmi”"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "17fd0d44",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Nauczyć się znajdować niewidzialne spacje i inne częste błędy w liniach."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0d12c3a4",
   "metadata": {},
   "source": [
    "## Sprawa robocza"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "6ee81952",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T16:18:58.550419Z",
     "iopub.status.busy": "2026-08-16T16:18:58.550297Z",
     "iopub.status.idle": "2026-08-16T16:18:58.569524Z",
     "shell.execute_reply": "2026-08-16T16:18:58.569116Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "False\n",
      "'секрет '\n"
     ]
    }
   ],
   "source": [
    "password = \"секрет \"\n",
    "print(password == \"секрет\")\n",
    "print(repr(password))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b7d3a2d7",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Sprawdź `password = \"секрет \"` (z odstępem na końcu): Porównaj to z `\"секрет\"` w `is_equal_before`, potem przeczyść strip() `cleaned` i porównaj ponownie w `is_equal_after`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "9c32c375",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T16:18:58.570702Z",
     "iopub.status.busy": "2026-08-16T16:18:58.570597Z",
     "iopub.status.idle": "2026-08-16T16:18:58.573041Z",
     "shell.execute_reply": "2026-08-16T16:18:58.572686Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "False True\n"
     ]
    }
   ],
   "source": [
    "password = \"секрет \"\n",
    "is_equal_before = password == \"секрет\"\n",
    "cleaned = password.strip()\n",
    "is_equal_after = cleaned == \"секрет\"\n",
    "print(is_equal_before, is_equal_after)"
   ]
  }
 ],
 "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
}
