Run
class Student: def __init__(self, name, age, country): self.name = name self.age = age self.country = country def __repr__(self): return f"[Name: {self.name}, Age: {self.age}, Country: {self.country}]" student1 = Student('Ram', 12, 'Canada') string_representation = repr(student1) print(string_representation)
Output