0 votes
in Python by

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

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. 

Related questions

0 votes
asked Jan 17, 2021 in Python by SakshiSharma
0 votes
asked Jun 24, 2020 in Python by Robindeniel
...