0

I am currently solving a ques which requires me to calculate this expression

1 2 1
1 4 6 4 1
1 5 10 10 5 1

Now my approach :
I calculate value till half. using the formula nCr. ex

1 2
1 4 6
1 5 10

as the same sequence is getting repeated i can copy the same sequence at the back to get the desired output.
Now the problem.
I store 1 5 10 in a string and i reverse it by word using. " ".join(stri.split()[::-1]) which i learnt from here and it gives the output 1 5 10 10 5 1
now what i cannot do is. 1 2 1 from 1 2 after reversing it I want to remove the first number like from 1 2 2 1 i want to delete one 2
How do i go about i.? What would be it's syntax.

Help appreciated

Community
  • 1
  • 1
Saras Arya
  • 3,022
  • 8
  • 41
  • 71

0 Answers0