About 446,000 results
Open links in new tab
  1. In Python, when to use a Dictionary, List or Set?

    Jul 1, 2019 · A list keeps order, dict and set don't: when you care about order, therefore, you must use list (if your choice of containers is limited to these three, of course ;-) ). dict associates each key with …

  2. Beginner to python: Lists, Tuples, Dictionaries, Sets

    Jul 3, 2020 · I have been trying to understand what the difference is between lists, tuples, dictionaries, and sets. All I've been able to gather is they use different brackets or braces. () {} []. Some are able...

  3. What are differences between List, Dictionary and Tuple in Python ...

    Sep 6, 2010 · A list can store a sequence of objects in a certain order such that you can index into the list, or iterate over the list. List is a mutable type meaning that lists can be modified after they have …

  4. When to use Lists, Sets, Dictionaries, or tuples in python?

    Jul 8, 2021 · Are you new to Python or new to programming in general? Anyways, it is not about learning the difference between Python's list, sets, dictionaries. You have to start learning about the data …

  5. python - List vs tuple, when to use each? - Stack Overflow

    Using a tuple instead of a list is like having an implied assert statement that this data is constant, and that special thought (and a specific function) is required to override that. Some tuples can be used as …

  6. python - Diferenças entre list, tuple e set - Stack Overflow em Português

    Feb 7, 2019 · A list e a tuple são mais parecidas entre si - ambas são Sequências (Sequences) - o que significa que elas contém dados de forma ordenada. A maior diferença e que uma lista é uma …

  7. What is the difference between sets and lists in Python?

    Sep 10, 2012 · As list are ordered (IE. have serial number) list are comparatively slow to execute whereas sets are fast. List in python is like Array of java or c. Printing a set almost always provide …

  8. python - What is the difference between lists,tuples,sets and ...

    I have confused with lists, tuples, sets and dictionaries someone give me clear cut idea. Give me the difference from your understanding don't give the text book definitions.

  9. Python dictionary vs list, which is faster? - Stack Overflow

    Aug 13, 2016 · tmp=tuple(set([n for n in factors(i)])) if len(tmp) != 2: continue if tmp not in num: num[tmp]=i suma+=i I am only concerned about performance. Why does the second example using …

  10. python - Immutable vs Mutable types - Stack Overflow

    Nov 9, 2011 · Here's a list of the most common mutable and immutable objects in Python. This list can be obtained by 1) painstakingly searching Python's official "Built-in Types" reference page for the …