Can you Slice a tuple | Sololearn: Learn to code for FREE!

+3

Can you Slice a tuple

Python

7/21/2019 3:39:11 AM

Deepak Thakur

4 Answers

New Answer

+4

Deepak Thakur Yes you can slice a tuple in Python Example tup = ('34', '45', '56') print(tup[1:]) Output ('45','56')

+1

0

-1

Yes one can slice a tuple like apple tuple_apple = ( 'a', 'p', 'p', 'l', 'e',) print(:3) result('a'.'p'.'p')