Fundamentals

160 articles
Interview Preparation Intermediate

11.16 Hands-on Exercises

Tuple Operations Practice combining concatenation, membership, and slicing on a single tuple. >>> t = (10, 20, 30) >>> t = …

Jan 20, 2026 Read more
Interview Preparation Intermediate

11.15 Interview Questions

Conceptual Questions What’s the difference between a tuple and a list? Why does (1) not create a tuple, but (1,) does? Why are tuples …

Jan 20, 2026 Read more
Interview Preparation Beginner

11.14 Best Practices

When to Use Tuples The data represents a fixed record (coordinates, RGB values, a database row). The value needs to be a dict key or set …

Jan 20, 2026 Read more
Interview Preparation Intermediate

11.13 Common Mistakes

Single-Element Tuple Forgetting the trailing comma — (1) is an int, not a tuple (see 11.2 Creating Tuples). This silently produces the wrong …

Jan 20, 2026 Read more
Interview Preparation Intermediate

11.12 Tuples in DevOps

Tuples and File Handling Files store plain text, so “reading a tuple” means parsing each line and explicitly reconstructing the …

Jan 20, 2026 Read more
Interview Preparation Intermediate

11.11 Common Algorithms

Search and aggregate operations on a tuple use the exact same techniques as on a list (see 10.12 Sorting and Searching and 10.14 Common …

Jan 20, 2026 Read more
Interview Preparation Intermediate

11.10 Performance

flowchart TD A["Memory (3 items)"] --> A1["tuple: 64 bytes"] A --> A2["list: 88 bytes"] B["Literal creation speed"] --> B1["tuple: faster"] …

Jan 20, 2026 Read more
Interview Preparation Intermediate

11.9 Immutability and Copying

The general mutable-vs-immutable distinction is covered in 5.9 Mutable vs Immutable Types, and general copying mechanics in 6.5 Copying …

Jan 20, 2026 Read more
Interview Preparation Intermediate

11.8 Nested Tuples

Creating and Accessing >>> nested = ((1, 2, 3), (4, 5, 6)) >>> nested[1][2] 6 Updating Nested Mutable Objects A …

Jan 20, 2026 Read more
Interview Preparation Beginner

11.6 Tuple Methods

Tuples have only two methods — a direct consequence of immutability. Every method that would modify a list (append, remove, sort, …; …

Jan 20, 2026 Read more
Interview Preparation Beginner

11.5 Tuple Operators

+ (Concatenation) Combines two tuples into a new tuple — since tuples are immutable, this can never modify either original. >>> (1, …

Jan 20, 2026 Read more
Interview Preparation Beginner

11.4 Tuple Packing and Unpacking

flowchart LR P1["1"] --> PK["packing"] P2["2"] --> PK P3["3"] --> PK PK --> PT["point = (1, 2, 3)"] PT --> UP["unpacking"] UP --> U1["x = …

Jan 20, 2026 Read more
Interview Preparation Beginner

11.3 Tuple Indexing and Slicing

Identical indexing and slicing rules to lists (see 10.3 List Indexing and Slicing) and strings — only the container type, and one copying …

Jan 20, 2026 Read more
Interview Preparation Beginner

11.2 Creating Tuples

Empty Tuple >>> t = () >>> t () Single-Element Tuple A tuple with exactly one element requires a trailing comma — (1) is …

Jan 20, 2026 Read more
Interview Preparation Beginner

11.1 Introduction to Tuples

What Is a Tuple? What Is It? An ordered, immutable collection — like a list, but once created it can never be changed. Written with …

Jan 20, 2026 Read more
Interview Preparation Intermediate

10.19 Hands-on Exercises

Inventory Manager A small class wrapping a list to manage a collection of items with add/remove/list operations. class InventoryManager: def …

Jan 20, 2026 Read more
Interview Preparation Intermediate

10.18 Interview Questions

Conceptual Questions What’s the difference between a list and a tuple? Why is list.append() O(1) amortized but list.insert(0, x) O(n)? …

Jan 20, 2026 Read more
Interview Preparation Beginner

10.17 Best Practices

Readable Code Prefer a list comprehension over an equivalent manual for + .append() loop when it stays short and clear — but fall back to a …

Jan 20, 2026 Read more
Interview Preparation Intermediate

10.16 Common Mistakes

Index Errors Accessing an index that doesn’t exist — especially easy off-by-one mistakes near a list’s boundaries. >>> …

Jan 20, 2026 Read more
Interview Preparation Intermediate

10.15 Lists in DevOps

Lists and File Handling Lists are the natural in-memory representation of file contents — one element per line or row. Iterating an open …

Jan 20, 2026 Read more
Interview Preparation Intermediate

10.14 Common Algorithms

Reverse def reverse_list(l): return l[::-1] >>> reverse_list([1, 2, 3]) [3, 2, 1] Remove Duplicates (Order-Preserving) …

Jan 20, 2026 Read more
Interview Preparation Intermediate

10.13 Performance

Time Complexity Operation Complexity Notes l[i] (index) O(1) Direct memory offset l.append(x) O(1) amortized Spare capacity absorbs most …

Jan 20, 2026 Read more
Interview Preparation Intermediate

10.12 Sorting and Searching

sort() vs. sorted() sort() sorts a list in place, returning None — use when the original order doesn’t need to be preserved. sorted() …

Jan 20, 2026 Read more
Interview Preparation Intermediate

10.11 Copying and Mutability

The general mechanics of assignment, shallow copy, and deep copy are covered in depth in 6.5 Copying Objects — this page focuses on …

Jan 20, 2026 Read more
Interview Preparation Intermediate

10.10 Nested Lists and Matrices

flowchart TD M["matrix"] --> R0["row 0: [1, 2, 3]"] M --> R1["row 1: [4, 5, 6]"] M --> R2["row 2: [7, 8, 9]"] matrix[1][2] → 6 — the first …

Jan 20, 2026 Read more
Interview Preparation Beginner

10.8 Built-in Functions

These are called as len(l), not l.len() — global functions, not methods, the same distinction covered for strings in 9.8 String Functions. …

Jan 20, 2026 Read more
Interview Preparation Beginner

10.7 List Methods

flowchart TD LM["list methods"] LM --> ADD["Add\nappend, extend, insert"] LM --> REM["Remove\nremove, pop, clear"] LM --> QRY["Query\nindex, …

Jan 20, 2026 Read more
Interview Preparation Beginner

10.6 List Operators

+ (Concatenation) Concatenates two lists into a brand-new list — neither original list is modified. >>> [1, 2] + [3, 4] [1, 2, 3, …

Jan 20, 2026 Read more
Interview Preparation Beginner

10.5 Removing Elements

remove() Removes the first occurrence of a given value (not a position) — raises ValueError if the value isn’t present. >>> l …

Jan 20, 2026 Read more
Interview Preparation Beginner

10.4 Modifying Lists

All of these mutate the list in place — the list’s identity (id()) stays the same throughout; see 10.11 Copying and Mutability. Update …

Jan 20, 2026 Read more
Interview Preparation Beginner

10.3 List Indexing and Slicing

Indexing flowchart LR A["10\n0 / -5"] --- B["20\n1 / -4"] --- C["30\n2 / -3"] --- D["40\n3 / -2"] --- E["50\n4 / -1"] Positive indices count …

Jan 20, 2026 Read more
Interview Preparation Beginner

10.2 Creating Lists

Empty Lists The starting point for building up a collection incrementally, e.g. inside a loop. >>> items = [] >>> items [] …

Jan 20, 2026 Read more
Interview Preparation Beginner

10.1 Introduction to Lists

What Is a List? What Is It? An ordered, mutable collection that can hold any mix of values, written with square brackets and …

Jan 20, 2026 Read more
Interview Preparation Intermediate

9.16 Hands-on Exercises

Log Level Analyzer Build a function that scans a batch of log lines and tallies how many fall into each severity level — an at-a-glance …

Jan 20, 2026 Read more
Interview Preparation Intermediate

9.15 Interview Questions

Conceptual Questions Why are Python strings immutable, and what does that mean for methods like .replace()? What’s the difference …

Jan 20, 2026 Read more
Interview Preparation Intermediate

9.14 Common Mistakes

Assuming a Method Mutates in Place Every string method returns a new string — the original is never changed, since str is immutable (see 9.1 …

Jan 20, 2026 Read more
Interview Preparation Beginner

9.13 Best Practices

Build Large Strings with join(), Not += Accumulating a string with += inside a loop is O(n²); collecting pieces in a list and calling …

Jan 20, 2026 Read more
Interview Preparation Intermediate

9.12 Strings in DevOps and AWS

Almost everything touched in cloud and infrastructure automation is a string: log lines, Amazon Resource Names (ARNs), IAM policy documents, …

Jan 20, 2026 Read more
Interview Preparation Intermediate

9.11 Memory and Performance

Why Immutability Matters Here Immutability makes strings safe to share across functions, threads, and dict/set keys without defensive …

Jan 20, 2026 Read more
Interview Preparation Intermediate

9.9 String Algorithms

flowchart TD SA["String Algorithms"] SA --> CH["Check\npalindrome, anagram"] SA --> TR["Transform\nreverse, compress"] SA --> …

Jan 20, 2026 Read more
Interview Preparation Beginner

9.8 String Functions

These are global built-in functions that accept a string as an argument, rather than methods called on the string object itself (len(s) vs. …

Jan 20, 2026 Read more
Interview Preparation Beginner

9.7 Common String Methods

Every method below returns a new string (or list/tuple) — none modify the original, consistent with 9.1 Introduction to Strings. Case …

Jan 20, 2026 Read more
Interview Preparation Beginner

9.6 String Formatting

Three Ways to Format flowchart TD A["% operator\nlegacy, printf-style"] --> D["Same output"] B[".format()\nPython 2.7+, readable"] --> D …

Jan 20, 2026 Read more
Interview Preparation Beginner

9.5 String Operators

Concatenation (+) Joins two strings end-to-end into a new string — the simplest way to build text from pieces, used constantly for messages, …

Jan 20, 2026 Read more
Interview Preparation Beginner

9.4 String Indexing and Slicing

Indexing and Negative Indexing Every character in a string has a position. Positive indices count from the left starting at 0; negative …

Jan 20, 2026 Read more
Interview Preparation Beginner

9.3 Escape Characters

The core escape sequences (\n, \t, \\, quotes) were introduced in 4.13 Escape Characters. This is the complete reference, including the …

Jan 20, 2026 Read more
Interview Preparation Beginner

9.2 Creating Strings

Single and Double Quotes Single and double quotes are functionally identical — the choice is purely stylistic, except when the text itself …

Jan 20, 2026 Read more
Interview Preparation Beginner

9.1 Introduction to Strings

flowchart TD S["str"] S --> C["Creation\nquotes, raw, unicode"] S --> I["Indexing & Slicing"] S --> F["Formatting\n% .format f-strings"] S …

Jan 20, 2026 Read more
Interview Preparation Intermediate

8.17 Hands-on Exercises

User Input Converter Build a function that safely converts input() text to int, float, or bool based on a requested target type, with …

Jan 20, 2026 Read more
Interview Preparation Intermediate

8.16 Interview Questions

Conceptual Questions What’s the difference between implicit and explicit type conversion? Why does int(3.9) return 3 instead of 4? …

Jan 20, 2026 Read more
Interview Preparation Intermediate

8.15 Common Mistakes

Invalid Conversions Trying to int() a decimal-looking string directly fails, because int() expects a string that’s already a whole …

Jan 20, 2026 Read more
Interview Preparation Beginner

8.14 Best Practices

Choose the Right Data Type Convert to the type that actually matches how the value will be used — don’t leave a numeric value as str …

Jan 20, 2026 Read more
Interview Preparation Intermediate

8.13 Type Conversion in DevOps

Five places type conversion shows up constantly in real infrastructure scripts. Environment Variables os.environ always stores values as str …

Jan 20, 2026 Read more
Interview Preparation Intermediate

8.12 Type Conversion in File Handling

Every one of these external data sources hands over strings (or, for JSON, occasionally the wrong type) — converting on the way in is a …

Jan 20, 2026 Read more
Interview Preparation Intermediate

8.11 Memory and Performance

Object Creation During Conversion Every conversion call (int(x), str(x), …) creates a brand-new object — it never modifies the …

Jan 20, 2026 Read more
Interview Preparation Intermediate

8.10 Safe Type Conversion

flowchart TD V["Untrusted value\n(e.g. user input, env var)"] --> T["try:\nint(value)"] T -->|"valid"| S["Success:\nreturn converted value"] …

Jan 20, 2026 Read more
Interview Preparation Intermediate

8.9 Type Conversion Errors

Three exception types account for nearly every conversion failure — recognizing them immediately tells you what went wrong. ValueError …

Jan 20, 2026 Read more
Interview Preparation Intermediate

8.7 Binary Type Conversion

bytes, bytearray, and memoryview themselves are covered in 5.7 Binary Data Types — this section focuses on the conversion rules for …

Jan 20, 2026 Read more
Interview Preparation Beginner

8.6 Collection Type Conversion

flowchart TD STR["str"] <--> INT["int"] STR <--> FLOAT["float"] INT <--> FLOAT STR <--> COLL["list / tuple / set"] BOOL["bool"] --> INT BOOL --> FLOAT …

Jan 20, 2026 Read more
Interview Preparation Beginner

8.5 String Conversion

str() Converts virtually any object into its human-readable string representation — used constantly for logging, printing, and building …

Jan 20, 2026 Read more
Interview Preparation Beginner

8.4 Numeric Type Conversion

The numeric types themselves are covered in 5.3 Numeric Data Types — this section focuses specifically on the rules for converting into each …

Jan 20, 2026 Read more
Interview Preparation Beginner

8.2 Implicit Type Conversion

flowchart LR subgraph Implicit["Implicit Conversion — Python does it automatically"] I1["int: 1"] --> IR["1 + 2.5 -> 3.5 (float)"] …

Jan 20, 2026 Read more
Interview Preparation Intermediate

7.18 Interview Questions

Conceptual Questions What is the difference between == and is? What is short-circuit evaluation, and why does it matter? Explain operator …

Jan 20, 2026 Read more
Interview Preparation Beginner

7.17 Best Practices

Readable Expressions Favor clarity over compactness — an expression that takes an extra half-second to parse mentally, multiplied across …

Jan 20, 2026 Read more
Interview Preparation Intermediate

7.16 DevOps Use Cases

Operators are the backbone of every monitoring/validation script — these five patterns cover most of what shows up in practice. CPU/Disk …

Jan 20, 2026 Read more
Interview Preparation Intermediate

7.15 Performance Considerations

Efficient Expressions Prefer x in a_set over x in a_list for repeated membership checks on large collections (see 7.7 Membership Operators) …

Jan 20, 2026 Read more
Interview Preparation Intermediate

7.14 Common Mistakes

Using is Instead of == What Goes Wrong? is compares identity, not value — it can appear to work for small integers or short strings, due to …

Jan 20, 2026 Read more
Interview Preparation Intermediate

7.12 Chained Comparisons

Syntax Python allows writing a < b < c directly, unlike languages where you’d need (a < b) and (b < c) explicitly. …

Jan 20, 2026 Read more
Interview Preparation Beginner

7.10 Boolean Evaluation

What Is It? Python treats every value as either “truthy” or “falsy” in a boolean context (if x:, while x:, bool(x)) …

Jan 20, 2026 Read more
Interview Preparation Intermediate

7.8 Identity Operators

This section covers is/is not specifically as comparison operators. The underlying concept — a variable being a reference to an object, not …

Jan 20, 2026 Read more
Interview Preparation Beginner

7.7 Membership Operators

in What Is It? Tests whether a value exists within a collection (list, string, dict keys, and so on), returning a bool. >>> 3 in …

Jan 20, 2026 Read more
Interview Preparation Intermediate

7.6 Bitwise Operators

What Are They? Operators that work on the individual bits of an integer’s binary representation, rather than its decimal value. Why …

Jan 20, 2026 Read more
Interview Preparation Beginner

7.5 Logical Operators

flowchart TD subgraph AND["and — True only if BOTH are truthy"] direction LR A1["True and True → True"] A2["True and False → False"] …

Jan 20, 2026 Read more
Interview Preparation Beginner

7.4 Comparison Operators

What Are They? Operators that compare two values and always return a bool. Why Are They Used? The foundation of every conditional (if, …

Jan 20, 2026 Read more
Interview Preparation Beginner

7.3 Assignment Operators

= Plain assignment binds a name to a value — already covered in 4.8 Variables and 6.4 Assignment Operations. >>> x = 5 >>> …

Jan 20, 2026 Read more
Interview Preparation Beginner

7.2 Arithmetic Operators

The standard mathematical operators, all usable on int and float (and some on other types, see 7.13 Operators with Different Data Types). …

Jan 20, 2026 Read more
Interview Preparation Beginner

7.1 Introduction to Operators

flowchart TD O["Operators"] O --> AR["Arithmetic\n+ - * / // % **"] O --> AS["Assignment\n= += -= ..."] O --> CO["Comparison\n== != < > <= >="] …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.15 Hands-on Exercises

Practice Programs Write a function demonstrating UnboundLocalError, then fix it using the global keyword. Given a nested list, show the …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.14 Interview Questions

Frequently Asked Questions What is the difference between a variable and an object in Python? Explain the difference between is and == with …

Jan 20, 2026 Read more
Interview Preparation Beginner

6.13 Best Practices

Meaningful Names Choose names that describe what a variable holds (user_count, not uc) — this is the single highest-leverage readability …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.12 Common Mistakes

UnboundLocalError What Goes Wrong? Referencing a variable inside a function before assigning it, when that same name is also assigned …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.11 Variables in DevOps

DevOps work is full of environment-specific values — variables, in every sense (Python, OS environment, and Terraform), are how …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.10 Variables in Functions

Passing Variables What Is It? Python passes arguments by “assignment” — the parameter name inside the function becomes a new …

Jan 20, 2026 Read more
Interview Preparation Beginner

6.9 Lifetime of Variables

Creation A variable’s lifetime begins the moment it’s first assigned a value. Usage A variable remains usable for as long as its …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.8 Variable Scope

flowchart TD B["Built-in\nlen, print, range, ... — always available"] Gs["Global\nnames at module level"] E["Enclosing\nnames in an outer …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.7 Memory Optimization

Object Reuse Where possible, CPython reuses existing immutable objects instead of allocating new ones for identical values. The two …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.6 Garbage Collection

Reference Counting What Is It? CPython’s primary memory-management mechanism, introduced in 5.12 Memory Representation — every object …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.5 Copying Objects

When shared references aren’t what you want (see 6.2 Objects and Variable References), Python offers three distinct ways to copy a …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.4 Assignment Operations

Reference Assignment b = a makes b point at the exact same object a does — no data is copied, as covered in 6.2 Objects and Variable …

Jan 20, 2026 Read more
Interview Preparation Intermediate

6.3 Memory Management: Stack vs Heap

Stack vs Heap What Is It? The stack holds function call frames — each frame stores its local variable names and the references they point …

Jan 20, 2026 Read more
Interview Preparation Beginner

6.2 Objects and Variable References

Objects, Briefly Every value a variable can refer to — numbers, strings, functions, even classes — is an object with its own identity, type, …

Jan 20, 2026 Read more
Interview Preparation Beginner

6.1 Introduction to Variables

flowchart TD V["Variable"] V --> R["References\nlabel, not a box"] V --> M["Stack vs Heap\nwhere things live"] V --> C["Copying\nshallow vs …

Jan 20, 2026 Read more
Interview Preparation Intermediate

5.18 Hands-on Exercises

Practice Programs Write a function that takes a list of mixed types and returns counts of how many are int, str, and float. Given a list …

Jan 20, 2026 Read more
Interview Preparation Intermediate

5.17 Interview Questions

Frequently Asked Questions What is the difference between a list and a tuple? Why is bool considered a subclass of int? What’s the …

Jan 20, 2026 Read more
Interview Preparation Beginner

5.16 Best Practices

Readability Choose the type whose name and behavior best communicate intent — a set clearly signals “uniqueness matters here” in …

Jan 20, 2026 Read more
Interview Preparation Intermediate

5.15 Common Mistakes

Three type-related mistakes that catch even experienced developers off guard occasionally. Unexpected Type Changes Because Python is …

Jan 20, 2026 Read more
Interview Preparation Intermediate

5.14 Data Types in DevOps

Real infrastructure tooling constantly maps external data (JSON APIs, config files, log lines) into these exact built-in types — …

Jan 20, 2026 Read more
Interview Preparation Intermediate

5.13 Choosing the Right Data Type

Picking the right type up front avoids both bugs and performance problems later — three questions to ask for any given piece of data. …

Jan 20, 2026 Read more
Interview Preparation Intermediate

5.12 Memory Representation

How Python Stores Objects Every Python object lives on the heap and carries metadata beyond its raw value — a reference count and a type …

Jan 20, 2026 Read more
Interview Preparation Beginner

5.11 Type Conversion

Implicit Conversion What Is It? Python automatically converts one type to another in certain mixed-type expressions, without you asking — …

Jan 20, 2026 Read more
Interview Preparation Beginner

5.10 Type Checking

type() Returns an object’s exact type. Good for debugging/inspection, but generally NOT recommended for validation logic (see …

Jan 20, 2026 Read more
Interview Preparation Intermediate

5.9 Mutable vs Immutable Types

Definition What Is It? A MUTABLE object’s value can be changed in place after creation (its id stays the same); an IMMUTABLE …

Jan 20, 2026 Read more
Interview Preparation Beginner

5.8 NoneType

None Object What Is It? Python’s singleton “no value” object — there is exactly one None in a running program, and its …

Jan 20, 2026 Read more
Interview Preparation Intermediate

5.7 Binary Data Types

These represent raw bytes rather than text — essential whenever Python touches files, network sockets, or any non-text data. bytes An …

Jan 20, 2026 Read more
Interview Preparation Beginner

5.6 Set Data Types

set What Is It? A mutable, unordered collection of unique, hashable values. Why Is It Used? Automatic deduplication and fast (O(1) average) …

Jan 20, 2026 Read more
Interview Preparation Beginner

5.5 Mapping Data Type

dict What Is It? Python’s built-in hash map — a mutable, unordered (technically insertion-ordered since 3.7) collection of key-value …

Jan 20, 2026 Read more
Interview Preparation Beginner

5.4 Sequence Data Types

A sequence is an ordered collection accessible by integer index. All four types below share this trait but differ in mutability and typical …

Jan 20, 2026 Read more
Interview Preparation Beginner

5.3 Numeric Data Types

int Whole numbers of arbitrary precision (Python ints don’t overflow like fixed-width integers in C — they grow as large as memory …

Jan 20, 2026 Read more
Interview Preparation Beginner

5.2 Python Object Model

Everything Is an Object What Is It? In Python, literally everything — numbers, strings, functions, even classes themselves — is an object …

Jan 20, 2026 Read more
Interview Preparation Beginner

5.1 Introduction to Data Types

flowchart TD PDT["Python Data Types"] PDT --> NUM["Numeric\nint / float / complex / bool"] PDT --> SEQ["Sequence\nstr / list / tuple / …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.20 Interview Questions

Frequently Asked Syntax Questions What is the difference between a keyword and an identifier? Why does Python use indentation instead of …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.19 Best Practices

A short checklist distilled from every section in this chapter — apply these consistently and most syntax-level code review comments …

Jan 20, 2026 Read more
Interview Preparation Intermediate

4.18 Real-World DevOps Examples

Seeing correct syntax structure in realistic scripts reinforces the rules covered across this chapter better than isolated snippets — …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.17 Common Syntax Errors

Five error types that account for the vast majority of syntax mistakes, especially for beginners — knowing what each one means makes them …

Jan 20, 2026 Read more
Interview Preparation Intermediate

4.16 Coding Standards (PEP 8)

PEP 8 is Python’s official style guide. This section covers it from the syntax angle — the specific formatting rules that affect how …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.14 Code Blocks

A code block is any indented group of statements introduced by a colon-terminated header line. All four kinds below follow the exact same …

Jan 20, 2026 Read more
Interview Preparation Advanced

Linux for DevOps

Why Every DevOps Engineer Needs Real Linux Fundamentals Docker, Kubernetes, Terraform, and CI/CD runners are not separate from Linux — …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.13 Escape Characters

Escape sequences let you embed special or hard-to-type characters inside an ordinary quoted string, using a backslash followed by a code. …

Jan 20, 2026 Read more
Interview Preparation Beginner

Linux Logs

Where Do Linux Logs Live? Two systems coexist on most modern distros: flowchart TB subgraph Sources KERNEL[Kernel Messages] …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.12 Output

print() The standard way to write text to the console. Accepts any number of arguments, converts each to a string, and prints them …

Jan 20, 2026 Read more
Interview Preparation Intermediate

Linux Storage Fundamentals

The Storage Stack, Top to Bottom flowchart TB FS["Filesystem: ext4 / xfs"] --> LV["Logical Volume (LVM)"] LV --> VG["Volume Group"] VG --> …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.11 Input

input() What Is It? Pauses the program, displays an optional prompt, and waits for the user to type a line of text and press Enter. Why Is …

Jan 20, 2026 Read more
Interview Preparation Intermediate

Linux Networking Fundamentals

What Handles Networking on Linux? Networking is implemented inside the kernel’s network stack; user-space tools (ip, curl, ss) just …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.10 Literals

A literal is a value written directly in source code, as opposed to one computed at runtime — 42, "hello", and True are all …

Jan 20, 2026 Read more
Interview Preparation Intermediate

Services & systemd

What Is systemd? systemd is the init system and service manager used by most modern Linux distributions (RHEL, Ubuntu, Debian, Amazon Linux …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.9 Constants

Concept of Constants What Is It? A value that’s meant to never change after it’s set. Why Doesn’t Python Enforce It? …

Jan 20, 2026 Read more
Interview Preparation Intermediate

Linux Boot Process

What Happens When a Linux Machine Boots? flowchart TD A["1. Firmware: BIOS/UEFI POST"] --> B["2. Bootloader: GRUB2"] B --> C["3. Kernel …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.8 Variables

Declaring Variables What Is It? Unlike many languages, Python has no separate declaration step — a variable comes into existence the moment …

Jan 20, 2026 Read more
Interview Preparation Intermediate

Processes & Jobs

What Is a Process? A process is a running instance of a program — it has its own PID (process ID), memory space, open file descriptors, and …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.7 Identifiers

What Are Identifiers? What Is It? Identifiers are the names you give to variables, functions, classes, and modules. What Are the Rules? It …

Jan 20, 2026 Read more
Interview Preparation Intermediate

Linux Permissions

What Are Linux Permissions? Every file and directory carries three permission sets — for the owner, the group, and others — each with read …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.6 Keywords

What Are Keywords? What Is It? Reserved words that are part of Python’s own syntax (if, for, def, class, …). The language …

Jan 20, 2026 Read more
Interview Preparation Beginner

Users & Groups

What Are Users and Groups? Every process and file on Linux is owned by a user ID (UID) and a group ID (GID) — numbers, not names. Usernames …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.5 Comments

Single-line Comments What Is It? Text starting with # that the interpreter ignores completely, running to the end of the line. Why Is It …

Jan 20, 2026 Read more
Interview Preparation Beginner

Linux File Types

What Are Linux File Types? Linux recognizes seven file types, all visible through the first character of ls -l’s permission string. …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.4 Indentation

Importance What Is It? In Python, indentation is not just a style preference — it is the syntax that defines block boundaries, replacing the …

Jan 20, 2026 Read more
Interview Preparation Beginner

Files & Directories

What Is a File, Really? On Linux, a filename is just a pointer (a directory entry) to an inode — a data structure holding the file’s …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.3 Statements

flowchart LR subgraph Header["Compound statement header"] K["if"] --> I["age"] --> O[">="] --> L["18"] --> C[":"] end Header --> …

Jan 20, 2026 Read more
Interview Preparation Beginner

Linux Filesystem

What Is the Linux Filesystem? Unlike Windows (C:\, D:\), Linux has one unified tree rooted at /. Every disk, partition, network share, or …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.2 Structure of a Python Program

Program Layout What Is It? The conventional top-to-bottom ordering of sections in a Python file. Why Is It Used? A predictable layout means …

Jan 20, 2026 Read more
Interview Preparation Beginner

Shell & Terminal

You’ve typed commands into a terminal a thousand times. But have you ever stopped to ask what’s actually happening between you …

Jan 20, 2026 Read more
Interview Preparation Beginner

4.1 Introduction to Python Syntax

What Is Syntax? What Is It? Syntax is the set of rules that defines what counts as a validly structured Python statement — where colons go, …

Jan 20, 2026 Read more
Interview Preparation Intermediate

Linux Kernel

Let’s talk about the kernel — the part of Linux that does all the unglamorous, absolutely essential work while every application on …

Jan 20, 2026 Read more
Interview Preparation Beginner

Linux Architecture

What Is Linux Architecture? Linux architecture describes how the system is layered from raw hardware up to the applications you run, and — …

Jan 20, 2026 Read more
Interview Preparation Beginner

Installation of Python

1.1 Installing Python Getting Python onto a machine is the prerequisite for everything else in this guide — the steps differ slightly per OS …

Jan 20, 2026 Read more
Interview Preparation Beginner

Introduction to Python

1.1 What Is Python? Definition of Python. Python is a high-level, general-purpose programming language known for readable syntax and a …

Jan 20, 2026 Read more
Interview Preparation Beginner

Introduction to Linux

If you’re getting into DevOps, cloud, or backend engineering, Linux isn’t optional background knowledge — it’s the ground …

Jan 20, 2026 Read more
Interview Preparation Beginner

Bash Fundamentals

What Is Bash Scripting? Bash (Bourne Again SHell) is both an interactive shell and a scripting language. A Bash script is just a text file …

Jan 20, 2026 Read more