+ 2

Can you Slice a tuple

Python

21st Jul 2019, 3:39 AM
Deepak Thakur
5 ответов
+ 4
Deepak Thakur Yes you can slice a tuple in Python Example tup = ('34', '45', '56') print(tup[1:]) Output ('45','56')
21st Jul 2019, 3:51 AM
deeyae
deeyae - avatar
+ 1
yes
22nd Feb 2020, 2:39 AM
Naresh meena
Naresh meena - avatar
0
yes
15th Nov 2020, 11:42 PM
Philip Assan
Philip Assan - avatar
0
Yes you can
5th Jun 2022, 12:46 PM
Abdulahi Redwan
Abdulahi Redwan - avatar
- 1
Yes one can slice a tuple like apple tuple_apple = ( 'a', 'p', 'p', 'l', 'e',) print(:3) result('a'.'p'.'p')
25th Mar 2021, 10:37 AM
Ehtesham Ul Islam