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

Python practice articles

1,137 articles · page 58 of 95 · Clear filters
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 →
Python practice

Product with the highest price

Write a Python program to find the product with the highest price. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sort the list values

Write a Python program to sort each list value of a dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

List to a nested dictionary

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

1 min readRead →
Python practice

Mean of dictionary values

Write a Python program to find the mean of a dictionary's values. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count frequencies in a list

Write a Python program to count how often each item appears in a list, using a dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Print a dictionary as a table

Write a Python program to print a dictionary of lists as a table. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Letter frequency with Counter

Write a Python program to create a dictionary of letter counts from a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Letter combinations from values

Write a Python program to print every combination of one letter from each dictionary value. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Unique values in a list of dicts

Write a Python program to print the unique values from a list of dictionaries. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Add values of matching keys

Write a Python program to combine two dictionaries, adding the values of keys that appear in both. 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.