Skip to content

Instantly share code, notes, and snippets.

@4193883-eng
Created October 9, 2022 12:18
Show Gist options
  • Save 4193883-eng/9031cea2061b9d9c346fb5743958653e to your computer and use it in GitHub Desktop.
Save 4193883-eng/9031cea2061b9d9c346fb5743958653e to your computer and use it in GitHub Desktop.
corrector.py
def corrector(string, width, symbol):
a = width-len(string)
b = a//2
result = f'{symbol*b}{string}{symbol*b}'
return result
print(corrector('ABOBA', 50, "-"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment