Skip to main content
MahiDev — Learn. Build. Become AI-ready.

Module 03

Data Types

Understand Python's built-in data types and when to use each one.

Beginner5 hours14 lessons

01

int — Integer Data Type

Store whole numbers with int, inspect their type and identity, and work with decimal, binary, octal, and hexadecimal literals in Python.

Beginner20 min

02

float — Floating-Point Data Type

Learn how Python stores real numbers, why 10 + 1.2 becomes a float, and how scientific notation represents extremely large and tiny values.

Beginner15 min

03

bool — Boolean Data Type

Master True and False, understand why they behave like 1 and 0, and learn how booleans power decisions in Python.

Beginner12 min

04

complex — Complex Number Data Type

Understand complex numbers, the j notation, real and imaginary parts, and why Python uses j instead of the mathematical i.

Beginner15 min

05

str — String Data Type

Master Python strings from quotes and multi-line text to escape characters, immutability, indexing, slicing preview, and why "123" is text—not a number.

Beginner20 min

06

bytes — Immutable Byte Sequence

Learn what bytes are, why computers store binary data, how Python builds immutable byte sequences, and how bytes power files, images, networking, and encryption.

Beginner15 min

07

bytearray — Mutable Byte Sequence

Understand mutable binary data, modify bytes in place, compare bytes with bytearray, and learn when each should be used in real applications.

Beginner12 min

08

range — Numeric Sequence Type

Learn lazy numeric sequences with start, stop, and step, loop with range(), index and slice range objects, and why range() is memory efficient.

Beginner12 min

09

list — Mutable Ordered Collection

Learn Python's most commonly used collection type. Master list creation, indexing, slicing, mutability, duplicates, and building lists from other iterables.

Beginner18 min

10

tuple — Immutable Ordered Collection

Tuples are ordered collections like lists, but their contents cannot be changed after creation. Ideal for fixed data such as coordinates, RGB colors, and database records.

Beginner15 min

11

set — Unique Unordered Collection

Store only unique values, automatically remove duplicates, and perform fast membership checks using Python's set data type.

Beginner15 min

12

frozenset — Immutable Unique Collection

Learn the immutable version of set, create frozensets from different iterables, and understand why they can be used as dictionary keys.

Beginner12 min

13

dict — Key–Value Mapping

Learn Python's dictionary data type to store data as key–value pairs, perform fast lookups, update values, and build real-world mappings like phone books and user profiles.

Beginner18 min

14

NoneType — The `None` Value

Learn what None really means in Python, how it differs from 0, False, and empty values, and why many built-in methods return None.

Beginner10 min