in Python by
Q:

What do you believe is the yield of the accompanying code part? Is there any mistake in the code? 

▼ Show 1 Answer

0 votes
by

list = ['a', 'b', 'c', 'd', 'e'] 

print (list[10:]) 

The consequence of the above lines of code is []. There won't be any mistake like an IndexError. 

You should realize that attempting to bring a part from the rundown utilizing a file that surpasses the part mean (model, endeavoring to get to list[10] as given in the inquiry) would yield an IndexError. Coincidentally, recovering just a cut at the beginning file that outperforms the no. of things in the rundown won't bring about an IndexError. It will simply restore an unfilled rundown. 

Python
Learn More with Madanswer

Related questions

0 votes
asked Jan 17 in Python by SakshiSharma
...