Skip to content

Commit f6c905e

Browse files
committed
Create stringpattern15.py
1 parent bb4a7ea commit f6c905e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

String Patterns/stringpattern15.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
s = "ABCDE"
2+
half = round(len(s)/2)
3+
for i in range(len(s)):
4+
if i == half:
5+
print(" ".join(s))
6+
elif i != half:
7+
print(" "*(half*2)+s[i])

0 commit comments

Comments
 (0)