0
What happens in to the output of a list when the list slice is like [2:1]?
For example: some_list = [1, 2, 3,] print(some_list[2:1]) What would the output be, since the first value in the list slice is bigger than the second value?
2 odpowiedzi
0
When the list slice is used for over the range or under the range, it returns back a blank list [ ]
0
would produce an exception (error) TypeError but if you wanted to do that you would have to put the third argument -1 is equal to the function range