Can you slice a tupule | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can you slice a tupule

Can you slice a tupule in python?

23rd Mar 2020, 10:09 AM
Christopher Martin
Christopher Martin - avatar
1 Answer
+ 1
Christopher Martin yes you can. tup = (1, 2, 3, 4, 5) print(tup[0:2]) #(1, 2) is the output.
23rd Mar 2020, 10:33 AM
maf
maf - avatar