in Python by
Q:

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. 

Click here to read more about Python
Click here to read more about Insurance

Related questions

0 votes
asked Jan 17 in Python by SakshiSharma
+1 vote
asked Jan 10 in Python by rajeshsharma
0 votes
asked Feb 18, 2020 in JAVA by rahuljain1
+1 vote
asked Feb 18, 2020 in Azure by rahuljain1
0 votes
asked May 17, 2019 in Interview Question by pratikdikshit
...