(a)What are the similarities and differences between lists and tuples.(2)
(b) What will be the output of the following code snippet?(1)
Tup1=( (1,2), ) * 7
print (len (Tup1 [3:8] ) )
Answers
Answered by
1
Similarities between lists and tuples :
both lists and tuples are data structures in Python, there are remarkable differences between the two, with the main difference being that lists are mutable while tuples are immutable. A list has a variable size while a tuple has a fixed size..
Differences between lists and tuples:
The main difference between lists and tuples is the fact that lists are mutable whereas tuples are immutable.
I HOPE THIS HEPLS YOU
THANK YOU
PLEASE MARK ME AS BRAINLIEST..❤️
Similar questions