import this
class Bio:
def __init__(self, data: list[str]):
self.data = data
def format(self) -> str:
keys = [
'Name', '⚡ Quick bio', '🔭 i\'m currently studing on',
'🌱 I’m currently learning', '💬 Ask me about', '✉️ contact'
]
strings = []
length_spaces = max(map(len, keys))
for key, value in zip(keys, self.data):
strings.append(f"{key: <{length_spaces}} {value}")
return '\n'.join(strings)
data = [
'Bernardo de Freitas',
'A kind of full-stack developer, dubstep head, python lover, not gamer, coder, programmer, '
'depressive :smiling_face_with_tear:, dog lover',
'Trybe', 'javascript, html, css',
'python, javascript, html, css, sql, functional paradigm',
'https://github.com/b166erbot#contact'
]
print('\n' * 3)
print(Bio(data).format())
output:
Name Bernardo de Freitas
⚡ Quick bio A kind of dubstep head, python lover, not gamer, coder, programmer, depressive 🥲, dog lover
🔭 i'm currently studing on Trybe
🌱 I’m currently learning javascript, html, css
💬 Ask me about python, javascript, html, css, sql, functional paradigm
✉️ contact https://github.com/b166erbot#contact