+ 5

What is the difference between tuples and lists in Python?

16th Jun 2017, 6:24 AM
ⓢⓐⓝⓓⓔⓔⓟ
ⓢⓐⓝⓓⓔⓔⓟ - avatar
3 Answers
+ 4
yes...thanks
16th Jun 2017, 6:37 AM
ⓢⓐⓝⓓⓔⓔⓟ
ⓢⓐⓝⓓⓔⓔⓟ - avatar
+ 2
u cant change values of a tuple like x = (10,20,30) , u never can run x[0] = 20. In lists u can change any index when u want, z = [10, 20, 30], u can do z[0] = 20. Understood?
16th Jun 2017, 6:30 AM
Juliano Ventola
Juliano Ventola - avatar
+ 2
In technical terms tuples have immutable values (which can't be changed) but list have mutable values(which can be changed).
17th Jul 2017, 12:55 PM
Faizan Ahmed
Faizan Ahmed - avatar