Created
November 29, 2021 16:43
-
-
Save pigmonchu/115722047fa83da9a3b0e4a6f995e833 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 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