Skip to content

Instantly share code, notes, and snippets.

@pigmonchu
Created November 29, 2021 16:43
Show Gist options
  • Save pigmonchu/115722047fa83da9a3b0e4a6f995e833 to your computer and use it in GitHub Desktop.
Save pigmonchu/115722047fa83da9a3b0e4a6f995e833 to your computer and use it in GitHub Desktop.
def what_i_do(p1, p2):
if p2 < len(p1):
return p1
gap = (p2 - len(p1)) // 2
return " " * gap + p1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment