What is the difference between list and tuples in Python?
belongs to collection: Python Interview Questions and Answers
All Answers
need an explanation for this answer? contact us directly to get an explanation for this answer
need an explanation for this answer? contact us directly to get an explanation for this answer
List | Tuple |
Lists are mutable. They can be changed. | Tuples are immutable (tuples are lists which can’t be changed). |
Lists are slower than tuples. | Tuples are faster than the list. |
Syntax: list_1 = [20, ‘aticleworld, 30] | Syntax: tup_1 = (20, ‘aticleworld, 30) |
total answers (1)