SQA Tools Blog

Learn testing and automation, one article at a time

Free tutorials, solved practice problems and interview prep for QA and automation engineers: Python, Playwright, Selenium, SQL, Git and more.

1,677Articles
1,141Solved Python problems
7Topics
100%Free

Latest articles

1,677 articles · page 22 of 140
Python practice

namedtuple helpers

Write a Python program using `_asdict`, `_replace` and `_make`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Records with namedtuple

Write a Python program to store employee records as named tuples. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Rotate a deque

Write a Python program to rotate a list of players for a round-robin game. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Moving average with deque

Write a Python program to compute a moving average over a window of 3 values. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Keep the last N items

Write a Python program that keeps only the 3 most recent log lines. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Stack with deque

Write a Python program that uses a deque as a last-in, first-out stack. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Queue with deque

Write a Python program that uses a deque as a first-in, first-out queue. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Unique values per key

Write a Python program that collects the unique cities each customer ordered from. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count with defaultdict(int)

Write a Python program to count characters with defaultdict(int). Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Group words by first letter

Write a Python program to group words by their first letter with defaultdict. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Add and subtract counters

Write a Python program that combines two inventories with Counter arithmetic. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Anagram check with Counter

Write a Python program to check whether two words are anagrams using Counter. Step-by-step explanation, colour-coded code and real output.

1 min readRead →

Preparing for a QA interview?

Take free timed mock tests with answers and explanations.