saving . . . saved List and Tuple has been deleted. List and Tuple has been hidden .
List and Tuple
Title
Question
The basic difference between list and tuple

Python-3.4.3 Getting-started-with-Lists 05-06 min 10-20 sec 22-06-19, 10:28 a.m. NiharikaTitli

Answers:

The list is an Data structure similar to an array. It is mutable, meaning that the same list object can be changed.

Tuple on the other hand is a immutable data structure and cannot be changed, hence one has to create a new tuple in case of changes
22-06-19, 10:31 a.m. ankitrj.iitb
Then why basically a tuple is used? If it is immutable, then where it is used.
22-06-19, 10:57 a.m. NiharikaTitli
It is used in situations where you prefer that the data should not change. In fact function arguments and return values are tuples
22-06-19, 5:02 p.m. ankitrj.iitb

Login to add comment


Log-in to answer to this question.