Whats up Guys?
How do you make this program work for all string inputs?
It reads only 5 and 6 letter words and outputs it in an X formation.
1) For example: Input
Hello
Output:
H o
e l
l
e l
H o
2) For example: Input:
Doctor
Output:
D r
o o
ct
ct
o o
D r
Here's my Code:
H= raw_input()
if len(H)==5:
Space = " "
A,B,C,D,E = H
for i in range(1):
print A+Space*3+E
print Space+B+Space+D+Space
print Space*2+C+Space*2
print Space+B+Space+D+Space
print A+Space*3+E
else:
if len(H)==6:
A,B,C,D,E,F = H
Space = " "
for i in range(1):
print A+Space*3+F
print Space+B+Space+E+Space
print Space*1+C+D+Space*1
print Space*1+C+D+Space*1
print Space+B+Space+E+Space
print A+Space*3+F
Thanks :)