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 102 of 140
Python practice

List of tuples to a dictionary

Write a Python program to convert a list of pairs into a dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Two lists in a dict to one flat dict

Write a Python program to pair the two list values of a dictionary into a flat dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Filter by value

Write a Python program to keep entries with values greater than 40. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Drop empty items

Write a Python program to drop items whose value is None. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Keys a, b, c with ranges

Write a Python program to create {"a": 1-5, "b": 6-10, "c": 11-15} as lists. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Matching key-value pairs

Write a Python program to find key-value pairs present in both dictionaries. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Replace marks with their average

Write a Python program to replace the numeric marks p1 and p2 with a single average entry. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sort items in descending order of value

Write a Python program to sort a dictionary's items by value, highest first. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count items in list values

Write a Python program to count the total number of items in all list values. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

List of dicts to keys and values

Write a Python program to convert a list of dictionaries into a list of its keys and a list of its...

1 min readRead →
Python practice

Dictionary of lists to list of lists

Write a Python program to convert {key: [values]} into [[key, values...], ...]. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Print a nested dictionary line by line

Write a Python program to print a nested dictionary line by line. 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.