mail . facebook . linkedin . tweets . instagram . telegram . hashnode
class Bio:
def __init__(self, hobbies, favorite_animal, activities):
self.hobbies = hobbies
self.favorite_animal = favorite_animal
self.activities = activities
def create_bio(self):
bio = (
f"Hi there! I'm someone who loves {', '.join(self.hobbies)}."
f" My favorite animal is {self.favorite_animal}."
f" I enjoy spending time with friends by {', '.join(self.activities)}."
)
return bio
hobbies = ["coding", "exploring new technologies"]
favorite_animal = "cats"
activities = ["hanging out", "having fun"]
my_bio = Bio(hobbies, favorite_animal, activities)
bio_text = my_bio.create_bio()
print(bio_text)