I just observed a behavior with python lists and wanted why and how it works.
If I have a list say my_list = [5]
Why does my_list[1:]
give me []
as the output but my_list[1]
give me an IndexError
I just observed a behavior with python lists and wanted why and how it works.
If I have a list say my_list = [5]
Why does my_list[1:]
give me []
as the output but my_list[1]
give me an IndexError