Znalostná bázaCentrum skúšok
SKSlovenčina
Vybrať jazyk13

CKTIS / Python

Znalostná báza — Python

Syntax, operátory a pojmy programovania. Nájdi vysvetlenie, prezri si príklad a pokračuj v učení.

Počet hesiel: 583

Python

str.title

Začne skupinu písmen titulkovou podobou a ďalšie písmená prevedie na malé.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

str.upper

Vráti text prevedený na veľké písmená Unicode.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

str.zfill

Doplní text nulami ASCII na minimálnu šírku width.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

sys.stdout — štandardný výstupný prúd

sys.stdout je textový prúd Pythonu pre štandardný výstup, ktorý predvolene používa print(). Umožňuje priamy zápis textu a vyprázdnenie buffera; nemusí pritom smerovať na terminál.

Základná · Python 3.14; repository image, production runtime not attested
Python

timeit.repeat

repeat vracia zoznam časov v poradí meraní.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

timeit.timeit

timeit meria celkový čas number vykonaní príkazu alebo funkcie bez argumentov.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

timeit.Timer

Timer uchováva príkaz a prípravu ako text alebo funkcie bez argumentov.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

type.__name__

Tento atribút triedy vracia jednoduché meno typu bez modulu a obklopujúcich tried.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.Annotated

Pripojí k základnému typu usporiadané metadáta.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.Any

Označuje dynamicky typovanú hodnotu.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.Callable

Opisuje volateľný objekt typmi argumentov a výsledku.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.cast

Oznámi kontrolóru predpokladaný typ výrazu.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.ClassVar

Označuje atribút triedy, ktorého priradenie cez inštanciu kontrolór odmietne.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.Dict — zastaraná anotácia slovníka

typing.Dict opisuje typy kľúčov a hodnôt slovníka. Od Pythonu 3.9 ide o zastaraný alias pre dict; v novom kóde používaj dict[K, V]. Anotácia za behu údaje nekontroluje.

Základná · Python 3.14; repository image, production runtime not attested
Python

typing.Final

Deklaruje meno, ktorého opätovné priradenie alebo prekrytie v podtriede kontrolór odmietne.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.Generic

Základ Generic[T] deklaruje triedu s vopred vytvorenou typovou premennou T.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.List — zastaraná typová anotácia zoznamu

typing.List[T] opisuje zoznam prvkov typu T. V Pythone 3.14 je stále dostupné, ale v novom kóde je vhodnejšie používať list[T].

Základná · Python 3.14; repository image, production runtime not attested
Python

typing.Literal

Obmedzuje statický typ na určité literálne hodnoty.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.NamedTuple

Vytvorí nemennú podtriedu tuple s pomenovanými anotovanými poľami dostupnými aj cez index a rozbalenie.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.Never

Prázdny typ nemá žiadnu možnú hodnotu.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.NewType

Vytvorí odlišný statický podtyp, napríklad pre identifikátor založený na int.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.NotRequired

Dovoľuje vynechať konkrétny kľúč TypedDict aj pri inak povinných kľúčoch.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.Optional

Povoľuje hodnotu typu T alebo None rovnako ako zjednotenie týchto typov.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested
Python

typing.overload

Deklaruje pre kontrolór rozličné vzťahy medzi typmi argumentov a výsledku.

Stredne pokročilá · Python 3.14; repository image, production runtime not attested