Python Programming - Tuples - Discussion

Discussion Forum : Tuples - General Questions (Q.No. 44)
44.
What is the output of the expression tuple('python')[::-1]?
('n', 'o', 'h', 't', 'y', 'p')
('p', 'y', 't', 'h', 'o', 'n')
['n', 'o', 'h', 't', 'y', 'p']
('n', 'o', 'h', 't', 'y', 'p')
Answer: Option
Explanation:
The [::-1] slice reverses the order of elements in the tuple.
Discussion:
1 comments Page 1 of 1.

Nazia khan said:   10 months ago
Difference in a, & d opn???

Post your comments here:

Your comments will be displayed after verification.