How to draw this pattern in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to draw this pattern in python

12345 1234 123 12 1

3rd Sep 2019, 3:47 PM
Kshitij Gangwar
Kshitij Gangwar - avatar
3 Answers
+ 4
for x in range(5,0,-1): for i in range(1,x): print (i,end='') else print () Dont know whether this is correct or not but I tried my best..
22nd Sep 2019, 3:11 PM
Mohamed Arshad
Mohamed Arshad - avatar
+ 2
You mean how to obtain this pattern as output in python?
3rd Sep 2019, 3:49 PM
Mohamed Arshad
Mohamed Arshad - avatar
0
Yes bro
3rd Sep 2019, 3:50 PM
Kshitij Gangwar
Kshitij Gangwar - avatar