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,901Articles
1,141Solved Python problems
7Topics
100%Free

Latest articles

1,901 articles · page 45 of 159
Python practice

Split a list into chunks

Write a generator that yields chunks of a given size. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Generator pipeline

Write a pipeline of generators that reads numbers, keeps the even ones and squares them. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Read a file lazily

Write a generator that yields non-empty, stripped lines from a file. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Custom iterator class

Write an iterator class that returns the characters of a word in reverse. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Iterable class with a generator method

Write a class whose objects can be looped over many times. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Generator expression of squares

Write a Python program that sums squares with a generator expression. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Fibonacci generator

Write a generator that yields Fibonacci numbers, and take the first 10. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Even numbers generator

Write a generator that yields even numbers up to a limit. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Countdown generator

Write a generator that counts down from n to 1. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

A for loop by hand

Write a Python program that rebuilds a `for` loop using `while`, `iter()` and `next()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Use iter() and next()

Write a Python program that walks through a list with `iter()` and `next()`. 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.