Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
Python
list uses [] dict uses {} tup uses ()
1 Resposta
+ 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}