+ 1

How to draw this pattern in python

543212345 4 4 3 3 2 2 1

3rd Sep 2019, 3:49 PM
Kshitij Gangwar
Kshitij Gangwar - avatar
2 Respostas
3rd Sep 2019, 6:27 PM
ABADA S
ABADA S - avatar
+ 1
This seems to work: s = '543212345' print(s) for i in range(1, 5): line = (' ' * i) + (s[i]) if i < 4: line = line + (' ' * (len(s) - i * 2 - 2)) + (s[i]) print(line)
3rd Sep 2019, 6:02 PM
Josh Greig
Josh Greig - avatar