CS Electrical And Electronics
@cselectricalandelectronics

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

All QuestionsCategory: PythonDifference between list, tuple, set, and dictionary in python?
CS Electrical And Electronics Staff asked 3 years ago

I need short information.

1 Answers
CS Electrical And Electronics Staff answered 3 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.