Created
January 21, 2020 13:14
-
-
Save BMU-Verlag/6a496d7fa8a5410d8fd32b19e4466da6 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
HEADER_SIZE=8 | |
def format_message(message): | |
if not message: | |
return None | |
header = f'{len(message):<{HEADER_SIZE}}' | |
return f'{header}{message}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment