- 1
what is difference between list and tuple
https://code.sololearn.com/cNrxxT1c13PS/?ref=app https://code.sololearn.com/cPIP8Oip4BB5/?ref=app https://code.sololearn.com/cG8rQ7Sj5L2K/?ref=app
5 ответов
+ 4
It's simple.
A tuple always have immutable [That cannot be changed later] items whereas A list always consists mutable items [That can be changed later] and also a tuple uses parenthesis () while the list uses Square brackets[]
As, you might have noticed that tuples didn't have append function also Reassigning it's values always gives an error.
+ 1
List is Mutable And Tuple Is Immutable as we can't change tuple after it has been declared but list can be changed any time
0
what is difference between list and tuple in python