Why The Output is this. | Sololearn: Learn to code for FREE!

+2

Why The Output is this.

I just wanted to know, why this output have been occurred. Please answer with a brief explanation. https://code.sololearn.com/cl0QXdS13RR8/?ref=app

10/4/2018 3:51:38 PM

Vishal Pal❄️⚛️

2 Answers

New Answer

+1

x[2:2] means at position 2 you are inserting a list.last 2 is not included.

+1

list[start:end:step]