{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "af9ac3c7",
   "metadata": {},
   "source": [
    "# 08-17 · Metody walidacji łańcuch znaków\n",
    "\n",
    "Praktyka do sekcji [„Metody weryfikacji: isalpha i inne”](/pl/chapters/rozdzial-08/08-17-metody-proverki.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3560aa42",
   "metadata": {},
   "source": [
    "## Cel\n",
    "\n",
    "Master, isalpha, isdigit, isalnum isspace sprawdzić skład linii."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "660f612f",
   "metadata": {},
   "source": [
    "## Sprawa robocza"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "1261ed2c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T16:18:56.933207Z",
     "iopub.status.busy": "2026-08-16T16:18:56.933099Z",
     "iopub.status.idle": "2026-08-16T16:18:56.949536Z",
     "shell.execute_reply": "2026-08-16T16:18:56.949058Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n",
      "True\n",
      "True\n",
      "True\n"
     ]
    }
   ],
   "source": [
    "print(\"Python\".isalpha())\n",
    "print(\"2026\".isdigit())\n",
    "print(\"Python3\".isalnum())\n",
    "print(\"   \".isspace())"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "71710751",
   "metadata": {},
   "source": [
    "## Podstawowa praktyka zadań ★\n",
    "\n",
    "Sprawdź trzy linie: `s1 = \"Python\"` metodą isalpha() → `r1`, `s2 = \"2026\"` metoda isdigit() → `r2`, `s3 = \"   \"` metoda isspace() → `r3`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "56427834",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-16T16:18:56.950557Z",
     "iopub.status.busy": "2026-08-16T16:18:56.950425Z",
     "iopub.status.idle": "2026-08-16T16:18:56.953011Z",
     "shell.execute_reply": "2026-08-16T16:18:56.952564Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True True True\n"
     ]
    }
   ],
   "source": [
    "s1 = \"Python\"\n",
    "s2 = \"2026\"\n",
    "s3 = \"   \"\n",
    "r1 = s1.isalpha()\n",
    "r2 = s2.isdigit()\n",
    "r3 = s3.isspace()\n",
    "print(r1, r2, r3)"
   ]
  }
 ],
 "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
}
