- 2
Difference between tuple and list
4 Answers
+ 3
tuple = (something, something else)
list = []
lists can be changed tuples not...
+ 2
someTuple = (1,2)
someList = [1,2]
tuple is immutable while list is mutable.... you may want to check what is mutable...
+ 2
b = [1,2]
a = (1,2)
b[0] = 3 # [3, 2]
a = (1,2)
a[0] = 3 # Error, not(3,2)
- 2
say some examples by using tuple and list.