Why The Output is this. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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

4th Oct 2018, 3:51 PM
Vishal Pal❄️⚛️
Vishal Pal❄️⚛️ - avatar
2 Answers
+ 1
x[2:2] means at position 2 you are inserting a list.last 2 is not included.
4th Oct 2018, 4:17 PM
Maninder $ingh
Maninder $ingh - avatar
+ 1
list[start:end:step]
5th Oct 2018, 6:44 AM
danvetio
danvetio - avatar