failed to print the pattern as expected for a given positive integer n in python
I wanted to print a particular pattern as shown below and for that, I created a list of lists with just [1] in it.
Then I ran a for loop from i= 2 to n and in each iteration, I have added [i]*(2i-3) in top of the list as well as in the bot…