Python

90 articles in this topic

OOP in Python: Classes, Inheritance, the MRO Diamond and Dunder Methods for Interviews

Work through Python's MRO diamond and the __eq__ plus __hash__ rule. These two examples explain many of the OOP output questions asked in interviews.

Updated 30 Oct 20265 min read139 viewsPython

String Problems in Python for Coding Rounds: Palindromes, Anagrams and Compression Solved

Python turns common string problems into one-liners, but interviewers usually remove that shortcut next. Learn the Pythonic and manual solutions for three recurring patterns.

Updated 30 Jul 20266 min read59 viewsPython

Python Functions Deep Dive: *args, **kwargs, the Mutable Default Trap and LEGB Scope

Trace the shared-list default, unpack extra arguments, and follow Python's LEGB lookup so familiar function snippets stop producing surprising output.

Updated 29 Jul 20265 min read69 viewsPython

Python vs C for TCS NQT: Which Language to Pick for the Coding Section

Choose Python or C for TCS NQT by comparing input speed, code length, execution and your existing practice, then lock the choice with a focused three-week routine.

Updated 30 Oct 20265 min read55 viewsPython

Python Interview Questions for Freshers 2026: Core Language, Data Structures and Coding

Prepare concise, accurate answers to Python fresher interview questions, then test your object model on mutable defaults, complexity, coding patterns and output traps.

Updated 30 Oct 20266 min read103 viewsPython

Python Output-Based Questions: 13 Solved Snippets

Trace 13 compact Python snippets on references, slices and mutation. Each example gives the output first and then explains the object-level reason.

Updated 30 Oct 20265 min read292 viewsPython