I am unable to understand how the statement below gets this answer? Question:
>>>a=[1,2,3,4,5]
>>>a[3:1]
>>>[]
>>>a[3:1:-1]
>>>[4, 3]
Please explain to me why did I get this output?
I am unable to understand how the statement below gets this answer? Question:
>>>a=[1,2,3,4,5]
>>>a[3:1]
>>>[]
>>>a[3:1:-1]
>>>[4, 3]
Please explain to me why did I get this output?