Create 4 - Centering Text.py

This commit is contained in:
Lukas Baumann 2021-02-18 10:29:14 +01:00 committed by GitHub
parent c9cad65d1a
commit b3fb5892cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
8/4 - Centering Text.py Normal file
View File

@ -0,0 +1,6 @@
width = int(input())
while True:
i = input()
if i == "END":
break
print("."* ((width - len(i) + 1) // 2) + i + "."* ((width - len(i)) // 2))