No products in the cart.

An index out of bounds given …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

An index out of bounds given with a list name causes error, but not with list slices. Why?
  • 1 answers

Tannu Rao 4 years, 11 months ago

Bcoz there is no element having index greater than or equal to length of list..hence it gives an error while using such index values but in slicing it automatically slices the list upto the very last element even if index is out of range.
http://mycbseguide.com/examin8/

Related Questions

What is alu
  • 1 answers
Define packages
  • 0 answers
Write a program for swapping two numbers
  • 1 answers
Write a program for swapping two numbers?
  • 0 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App