How to Approach a Python Technical Interview If You Have Not Coded in 6 Months
DEV Community

How to Approach a Python Technical Interview If You Have Not Coded in 6 Months

Six months of not coding creates a specific type of gap. The concepts are still there. The syntax has faded slightly. The confidence is significantly lower. A realistic, prioritized preparation guide based on what actually appears in screens.

This guide is for that situation specifically. Not for someone starting from zero and not for someone who codes daily. For the developer who knows Python but has been away from it and has an interview in 2 to 4 weeks.

What Not to Do

  • Do not spend the first week grinding LeetCode hard problems. This is the most common mistake and it produces two weeks of frustration followed by the realization that you have not covered the fundamentals that are more likely to appear in your actual interview.
  • Do not try to relearn everything. You have not forgotten everything. You need to refresh specific areas and build confidence, not rebuild from zero.
  • Do not skip the basics because they feel easy. Default mutable arguments, scope resolution, and list mutation are not beginner topics. They are intermediate topics that appear in senior-level interviews because they test genuine understanding rather than memorized patterns.

Week 1 - Refresh Core Python Behavior

Spend 20 to 30 minutes per day on these specific topics. For each one, read a short explanation and then trace 3 to 5 code examples without running them first.

Day 1 to 2 - Mutability and references

  • The difference between mutable and immutable types
  • How assignment versus mutation affects shared references
  • List copy versus reference

Day 3 to 4 - Scope

  • LEGB rule
  • The UnboundLocalError pattern
  • nonlocal and global

Day 5 to 6 - Functions and arguments

  • Default mutable arguments
  • How Python passes arguments (object reference)
  • The difference between positional, keyword, and default arguments

Day 7 - Review

Take 10 problems covering the above topics and trace them from scratch. Check your accuracy. Identify which specific concepts still trip you up.

Week 2 - Intermediate Concepts and Interview Patterns

Day 8 to 9 - Comprehensions

  • List, dictionary, and set comprehensions
  • Nested comprehensions
  • The filtering pattern

Day 10 to 11 - Iterators and generators

  • What an iterator is and how it works
  • Generator functions with yield
  • Generator exhaustion
  • When to use generators versus lists

Day 12 to 13 - Classes

  • Class versus instance attributes
  • The mutable class attribute trap
  • Method resolution order basics
  • Special methods: __init__, __str__, __repr__, __len__

Day 14 - Algorithms warm-up

Start easy LeetCode problems. Not to learn algorithms but to warm up code-writing speed and recall. 3 to 5 easy problems per day is sufficient.

Week 3 - Interview Simulation

Day 15 to 16 - Dry-run practice

Practice predicting code output for 15 minutes before any other preparation each day. This skill atrophies fastest and recovers quickly with focused practice. Use PyCodeIt for AI-generated problems with immediate feedback.

Day 17 to 18 - Medium algorithms

Focus on the patterns most likely to appear: two pointers, sliding window, hash maps for O(n) solutions, basic recursion.

Day 19 - Behavioral questions

Write out 3 to 5 concrete examples from your past work covering:

  • Solving a difficult technical problem
  • Handling a disagreement with a teammate
  • A project that did not go as planned

Day 20 to 21 - Mock interviews

Do at least two timed mock interviews. Use a blank editor with no autocomplete. Time yourself. Practice talking through your thinking out loud.

The One Skill That Matters Most

The difference between passing and failing a Python phone screen is usually not whether you know the algorithm. Most candidates know enough algorithms. The difference is whether you can communicate your thinking in real time.

Practice saying out loud what you are doing while you write or trace code:

  • "I am creating a new list here, not modifying the original."
  • "This is a dictionary lookup so it is O(1)."
  • "The base case here is when the list is empty."

Interviewers are specifically listening for evidence that you understand what your code does, not just that you can produce code that works. Narrating your thinking provides that evidence.

Tools and Resources for This Plan

  • For dry-run practice: PyCodeIt - free, AI-generated, unique problems every session, covers all the concepts in this plan
  • For algorithm practice: LeetCode easy and medium problems filtered to Python
  • For concept review: Real Python (realpython.com) for in-depth articles on each topic
  • For mock interviews: Pramp (free), interviewing.io (paid), or a friend who can ask "what does this print" questions

Six months away from Python does not mean six months of catch-up. With focused, prioritized practice the refresh takes two to three weeks. The key is not trying to cover everything but covering the right things in the right order.

Comments

No comments yet. Start the discussion.