What is the output of the following code ?
>>> s = ['python', 'is', 'easy', 'programming', 'language'] >>> s[:-1]
['python', 'is', 'easy', 'programming']
['python', 'is', 'easy', 'programming', 'language']
['python', 'is', 'easy']
['python', 'is']
It is provide a list slice upto last but one element that it "programming"
Refer to https://www.pythoneasy.com/python-programming-tutorial/python-list#5
Comment here: