### How to get the correct output in this homework problem?

As a freelancer I picked up a homework project but I got stuck with it. How can I get this code to get the desired output? The code is: n = int(input(‘\n Enter Your Value of N : ‘)) answer = [[1]] for i in range(2, n+1): t = ([i]*((2*i)-3)) answer.insert(n,t) for a in answer:…

Details