48. What is the output of following code in Python?¶
thelist=['a','b'] >>> print thelist[3:] Ans: The output of this code is following: [] Even though the list has only 2 elements, the call to thelist with index 3 does not give any index error.
thelist=['a','b'] >>> print thelist[3:] Ans: The output of this code is following: [] Even though the list has only 2 elements, the call to thelist with index 3 does not give any index error.