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 44 of 159
Python practice

Format a date

Write a Python program to print a date in several formats. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Create a date and read its parts

Write a Python program to create a date and print its year, month, day and weekday. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Group consecutive items

Write a Python program that groups log lines by level with `itertools.groupby`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Take values while a condition holds

Write a Python program that takes Fibonacci numbers while they are below 100. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Send values into a generator

Write a generator that keeps a running average of values sent to it. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Generator vs list memory

Write a Python program that compares the memory of a list and a generator of a million numbers. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Iterators from zip and enumerate

Write a Python program that shows zip and enumerate return iterators. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Cycle through values

Write a Python program that assigns browsers to 7 tests in rotation. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Unique id generator

Write a generator that produces ids like TC-001, TC-002, . Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Running total

Write a generator that yields the running total of a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Flatten nested lists with yield from

Write a recursive generator that flattens nested lists. 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.