Python data engineering interview problem. Difficulty: beginner. Pattern: Sorting. About 10 minutes. Part of the Pro drill bank.
A payments file mixes even and odd integer totals because of a legacy cents encoding. A recon job should keep only the even totals for one ledger.
Return the even numbers from a mixed list of order totals.
Input: even_totals([1, 2, 3, 4]) Output: [2, 4] This input follows the stated rules and produces this output.
Topics: lakebench, python, comprehensions.
More Python interview questions · All interview problems · Learn data engineering
Interview-style drill: Return the order totals that are even numbers, using a single expression.
Return the even numbers from a mixed list of order totals.