from dataclasses import dataclass @dataclass class Person: name: str age: int city: str person = Person("Alice", 25, "New York") print(person) # Output: Person(name='Alice', age=25, city='New York')
Person(name='Alice', age=25, city='New York')