How do I write a Python program to print the pattern?

Question:

How do I write a Python program to print the pattern?
543210
432105
321054
210543
054321
543210

Asked By: siddharthmallik

||

Answers:

You can do it by something like this:

a = "543210"
print(a)

for i in range(6):

    a = a + (a[0])

    a = a[1:]

    print(a)
Answered By: Muhammad Umer
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.