0

Python

list uses [] dict uses {} tup uses ()

23rd Sep 2018, 9:13 AM
SHRAVANI KORANNE
SHRAVANI KORANNE - avatar
2 Réponses
+ 1
A tuple is a collection of values and it is declared using parentheses.they are immutable. tuple=(12,13,34) LIST  Unlike in C++, we don’t have arrays to work with in Python. Here, we have a list instead.they are mutable list=[12,13,34] dictionary: Known in other languages as hash tables, associative arrays, maps, etc. They are like lists but instead of integers you can use any immutable type as the index (including strings). And one more thing: they are unordered like sets. abc= {" cars": 100," trucks"= 200}
23rd Sep 2018, 4:39 PM
SHRAVANI KORANNE
SHRAVANI KORANNE - avatar