csc-python-solutions/08/4 - Centering Text.py

7 lines
156 B
Python
Raw Normal View History

2021-02-18 09:29:14 +00:00
width = int(input())
while True:
i = input()
if i == "END":
break
print("."* ((width - len(i) + 1) // 2) + i + "."* ((width - len(i)) // 2))