PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

Python · Theory

List vs Set vs Tuple vs Dictionary

← All stacks

Theory

40/268

List vs Set vs Tuple vs Dictionary

Four built-ins cover almost every fresher program. List: ordered, mutable, duplicates OK — [1, 2, 2]. Tuple: ordered, immutable — (1, 2). Set: unordered unique — {1, 2}. Dict: key → value — {"Asha": 90}. Draw a 4-row table in your head: order? can change? duplicates or keys?

That table beats a long speech. Example: unique emails → set. Student record → dict. Marks in exam order → list. RGB colour → tuple. Don’t say “they are all collections” and stop.

List vs Set vs Tuple vs Dictionary — output: list keeps two A, tuple keeps two A, set one A, dict key A→1.

Diagram
point = (3, 4)   immutable
     x=3     y=4
Exam tip

Four-row table: order, mutable, duplicates/keys.

Example

# Collections compared
print(["A", "A"])
print(("A", "A"))
print({"A", "A"})
print({"A": 1})

List vs Set vs Tuple vs Dictionary — output: list keeps two A, tuple keeps two A, set one A, dict key A→1.

Short notes

  • DefList ordered mutable
  • RuleTuple ordered immutable
  • RememberSet unique
  • UseDict key→value

Questions

1

Explain List vs Set vs Tuple vs Dictionary as if you are teaching a junior — definition, then one tiny script.

2

What does the example print, and why?

3

What mistake do freshers make with List vs Set vs Tuple vs Dictionary?

Previous← List vs Dictionary in PythonNextSet vs Dictionary in Python →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.