Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
from typing import TypeVar, Generic, Protocol, TypedDict, Literal T = TypeVar("T") class Stack(Generic[T]): def push(self, item: T) -> None: ... def pop(self) -> T: ... class Comparable(Protocol): def __lt__(self, other: "Comparable") -> bool: ... class UserDict(TypedDict): id: int; name: str; role: Literal["admin", "user", "guest"] def process(role: Literal["admin", "user"]) -> None: ...
Result
Open