🐍 Python Data Types for Beginners

📚 Table of Contents

  • What are Data Types?
  • Python Built-in Data Types
  • Numbers
  • String
  • List
  • Tuple
  • Set
  • Dictionary
  • Boolean
  • FAQ

💡 Quick Tip

Use type() function to check the data type of any value.

⚠️ Common Mistakes

  • Confusing list and tuple.
  • Using wrong brackets.
  • Ignoring data types while coding.

✍️ By Roshni Code Charm

📅 July 2026 | ⏱️ 6 min read

📦 What are Data Types?

Data types define what type of value a variable stores. Python automatically identifies the data type.

🔢 Numbers

Python supports different types of numbers.

age = 18          # Integer

height = 5.3      # Float

number = 2+3j     # Complex

🔤 String

String stores text values.

name = "Roshni"

print(name)

📚 List

List stores multiple values and can be changed.

colors = ["Pink","Blue","Green"]

📌 Tuple

Tuple stores multiple values but cannot be changed.

numbers = (1,2,3)

🔹 Set

Set stores unique values only.

items = {1,2,3}

📖 Dictionary

Dictionary stores data in key-value pairs.

student = {
"name":"Roshni",
"age":18
}

✅ Boolean

Boolean stores True or False values.

is_student = True

🔍 Checking Data Type

x = 10

print(type(x))

🚀 Practice Example

name = "Roshni"
age = 18
skills = ["Python","HTML","CSS"]

❓ Frequently Asked Questions

1. How many data types are in Python?

Python has many built-in data types like String, List, Tuple, Set, Dictionary and Numbers.

2. Is Python dynamically typed?

Yes, Python automatically detects the data type.

3. Which data type stores multiple values?

List, Tuple, Set and Dictionary store multiple values.

📚 Related Articles