I have just started learning python and I was playing with the slice (:) operator and strings. For some reason if I specify an invalid index followed by the slice operator it does not give the "Out of range" error.
>>> s='Hello'
>>> print s[5]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: string index out of range
>>> print s[5:]
//Prints just a newline, no error
Can someone please explain why I am not getting error in the 2nd case.