✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Mis prinditakse konsooli kui järgnev koodijupp tööle panna?
class Book: def __init__(self, title, author): self.title = title self.author = author def __repr__(self): return f"Book(title='{self.title}', author='{self.author}')" def __str__(self): return f"'{self.title}' by {self.author}"if __name__ == '__main__': book = Book("1984", "George Orwell") print(book) print(repr(book))