laojun001 发表于 2025-2-25 12:33

test03.py

from collections import namedtuple

person = namedtuple("Person", ["name", "age", "gender"])

p = person("john", 12, "男")

print(p.name)
页: [1]
查看完整版本: test03.py