class Post:
def init(self, text, likes):
self.text = text
self.likes = likes
def show(post):
print(f”{post[‘text’]} – {post[‘likes’]}”)
posts = [
Post(“Hello”,3),
Post(“Hi”, 5),
]
print(posts[0].text)
print(posts[0].likes)
print(posts[1].text)
print(posts[1].likes)