Created
April 13, 2021 23:56
-
-
Save schlerp/5e4453b9a52deb5f600495d33eec407d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def format_title(title, subtitle=None, subtitle_font_size=14): | |
title = f'<b>{title}</b>' | |
if not subtitle: | |
return title | |
subtitle = f'<span style="font-size: {subtitle_font_size}px;">{subtitle}</span>' | |
return f'{title}<br>{subtitle}' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment