$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · hard · #208

Fill in the blank

# a lightweight immutable record
from typing import NamedTuple
class P(____):
    x: int

Answer: NamedTuple (also accepted: NamedTuple, NamedTuple())

Subclassing NamedTuple gives a small immutable class with named fields.
Play Problem Solving ▸