+ 8

What is the difference between list and tuples?

Very critical

17th Apr 2019, 1:21 AM
RISHABH MISHRA
RISHABH MISHRA - avatar
12 ответов
+ 9
Main difference lists are mutable and tuples are immutable. A mutable data type means that a python object of this type can be modified. An immutable object can’t.
17th Apr 2019, 7:04 AM
Shubham Kumar
+ 5
The main difference is that list is mutable and tuple is immutable, meaning that you can change list however you like and the tuple not so much.
17th Apr 2019, 1:49 AM
Luis Sepúlveda
Luis Sepúlveda - avatar
+ 5
1. Lists are enclosed with block brackets [ ], while tuples use normal brackets ( ) 2. [1] is a valid list while (1) is not a tuple but an int. To make a tuple of 1 item you add a comma like (1,) now that's a tuple. 3. Lists are mutable while tuples are immutable 4. .....
17th Apr 2019, 5:11 AM
Dan Rhamba
Dan Rhamba - avatar
17th Apr 2019, 3:53 AM
Maninder $ingh
Maninder $ingh - avatar
+ 1
Moreover, tuple uses less data than list and we can acess tuple faster than list( that’s what i’ve learned)
17th Apr 2019, 3:07 PM
Lê Trọng Hoàng Minh
0
Tuples and list are similar. But they have some differences. List can be edited like we can append, pop, insert value inside list, that's mean they are mutable. And also list start with large braces []. Beside this, tuples are the list that can not be edited once created, that's mean they are immutable. And also tuples start with medium braces {}.
17th Apr 2019, 8:26 AM
Avinash Singh
Avinash Singh - avatar
0
سلام
18th Apr 2019, 1:15 AM
hasan
0
18
19th Apr 2019, 1:25 AM
DęLbęrt Byrøn SaLī
DęLbęrt Byrøn SaLī - avatar
0
List is mutable and tuple is immutable. Which means in list you can add string/number/float in it at any time but In tuple you can't add new items once it's made. List's syntax is [ ] and tuple syntax is ( )
22nd Apr 2019, 9:33 AM
Raman Sharma
Raman Sharma - avatar
0
list - you can play around with it. Tuple - once u define it don't dare to mess with it .
9th May 2019, 3:43 PM
Krishna
Krishna - avatar