Skip to content

Python code review tasks

Python tasks: find the bug or predict the output, then get your answer reviewed.

Asynchronous file sending sometimes finishes writing incorrectly

Code review · python · asyncio · review · cancellation · resource-cleanup · shared-state
Medium

Asynchronous upload log behaves inconsistently on repeated calls

Code review · python · asyncio · mutable-default · resource-cleanup · shared-state
Easy

Asynchronous queue summary sometimes returns incorrect labels and leaves an open resource

Code review · python · asyncio · review · late-binding · resource-cleanup · shared-state
Hard

Event report shows incomplete data when working with streaming input

Code review · python · review · iterator consumption · generators · api-contract
Easy

Session log completion sometimes returns an incomplete result

Code review · python · code-review · resource-cleanup · iterator-consumption · error-handling
Medium

Summary of report buckets became unstable on repeated runs

Code review · python · review · hard · shared-state · iterator-consumption
Hard

Event digest preview behaves unstably on streaming input

Code review · python · review · mutable defaults · iterator consumption · shared state
Easy

The async package check report sometimes corrupts strings and leaves a temporary resource open

Code review · python · asyncio · mutable-defaults · resource-cleanup · iterator-consumption
Medium

The notification scheduler produces unstable labels and send times

Code review · python · review · late binding · asyncio · closures
Hard

The report preview window started returning incomplete and unstable data

Code review · python · review · iterator consumption · shared state · easy
Easy

Session export finalization sometimes produces an incomplete log

Code review · python · review · medium · resource cleanup · async cancellation · standard-library
Medium

Preview window returns unstable data

Code review · python · shared-state · mutable-defaults · asyncio · resource-cleanup
Hard

The message template batch started behaving unstably on repeated calls

Code review · python · review · easy · mutable-defaults · late-binding · shared-state
Easy

Resetting the async task cache sometimes leaves the file open and does not complete all operations

Code review · python · asyncio · async cancellation · resource cleanup · shared state · review
Medium

Batch event labeling behaves inconsistently on repeated calls

Code review · python · late-binding · resource-cleanup · iterator-consumption · review
Hard

The event summary preview became dependent on iteration order

Code review · python · review · easy · iterator consumption · shared state
Easy

Finalizing an export run sometimes leaves a temporary file behind and loses part of the rows

Code review · python · review · medium · resource cleanup · asyncio · tempfile
Medium

Notification window creates unstable actions and shared history

Code review · python · review · hard · shared-state · late-binding · mutable-defaults
Hard
Easy

Report package export sometimes returns incomplete results and hangs after interruption

Code review · python · review · asyncio · async cancellation · resource cleanup · state
Medium

Notification actions panel started building incorrect commands

Code review · python · review · hard · late-binding · iterator-consumption
Hard

The stream preview window sometimes returns incomplete and duplicated lines

Code review · python · iterator consumption · resource cleanup · shared state
Easy

Session export leaves extra artifacts and does not always finish writing

Code review · python · review · medium · resource cleanup · async cancellation · filesystem
Medium

Notification channel list behaves inconsistently on repeated actions

Code review · python · review · hard · shared-state
Hard

Contact badge preview started behaving unstably

Code review · python · review · easy · mutable-defaults · shared-state
Easy

What will the program with two independent collectors print

Predict the output · python · mutable defaults · output · easy
Easy

What will the program output when an asynchronous task is cancelled

Predict the output · python · asyncio · async cancellation · output · medium
Medium

What will the program output with a set of metric formatters

Predict the output · python · late binding · closures · output
Hard

What will the program output with a one-time source and report preview

Predict the output · python · iterators · consumption · output
Easy

What will the program print when the resource is finalized and the context manager exits

Predict the output · python · resource cleanup · context manager · exceptions · stdout · output
Medium

What will the program print with a snapshot of channel participants

Predict the output · python · shared state · dataclass · mutable defaults · output
Hard

What will the program with participant snapshots and the default cache print

Predict the output · python · mutable defaults · shared state · output
Easy

Cancellation Trace of an Asynchronous Consumer

Predict the output · python · asyncio · async cancellation · async generator · output
Medium

What will the program output with a one-shot source and a snapshot of values?

Predict the output · python · iterator-consumption · output · standard-library
Easy

What will a program with a set of sort keys print

Predict the output · python · late binding · closures · sorted · lambda · output
Hard
Python interview questions