what will be an output of the following python t =[1,2,3,4] print (t[1:3])
1. (1,2)
2. (1,2,4)
3. (2,3,4)
4. (2,4)
Answers
Answered by
1
Required Answer:-
Given Cσde:
t =[1,2,3,4]
print(t[1:3])
To Find:
- The output of the given cσde. (Language: Python)
Output:
- [2, 3]
Explanation:
- Given list: t = [1,2,3,4]
- t{1:3] returns the elements of list t from index 1 (starting range) to index 2(ending range - 10.
- Elements from index 1 to 2 are - [2,3].
- Therefore, output: [2,3].
Refer to the attachment.
•••♪
Attachments:
Answered by
0
Answer:
2
Explanation:
I will chosse this anwer
Similar questions