Can someone please explain why the 1st output and how can I fix it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can someone please explain why the 1st output and how can I fix it?

I want the second output but I need to delete more times from the list, not just once. Can someone please explain why the 1st output and how can I fix it? # However this works if I want lower numbers (see below), which makes it even weirder https://code.sololearn.com/co2D3hwY5m7K/?ref=app

11th Feb 2020, 4:33 PM
Blabla Blablabla
2 Answers
+ 1
You have to understand what the slice notation actually does. I have linked the article treating the topic, so that you can study up. https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2453/?ref=app nums[7500:] accesses all the numbers FROM 7500 to the end. nums[:7500] accesses the numbers TO 7500, from the beginning. Try to think through your code again like this, I'm sure you will understand the output better. One more thing: This forum is meant to become a 'library' for others as well. So it is actually required that you write a proper question with a proper headline and proper tags *here*!
11th Feb 2020, 5:41 PM
HonFu
HonFu - avatar
+ 1
HonFu Thanks!
11th Feb 2020, 5:51 PM
Blabla Blablabla