Difference between list, tuple, set, and dictionary in python?

All QuestionsCategory: PythonDifference between list, tuple, set, and dictionary in python?
Chetan Shidling Staff asked 4 years ago

I need short information.

1 Answers
Chetan Shidling Staff answered 4 years ago

The difference between list, tuple, set, and the dictionary is:

  1. The list is a collection that is ordered and changeable. Allows duplicate members.
  2. A tuple is a collection that is ordered and unchangeable. Allows duplicate members.
  3. Set is a collection that is unordered and unindexed. No duplicate members.
  4. Dictionary is a collection that is unordered, changeable, and indexed. No duplicate members.