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

Group a list by a function

Write a Python program to group the elements of a list by the result of a function such as `len`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Total length of string keys

Write a Python program to count the number of keys and the total characters in them. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Pair keys with their single list item

Write a Python program to turn {key: [value]} into one dictionary per combination. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Frequency of values

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

1 min readRead →
Python practice

Keys with the shortest lists

Write a Python program to find the keys whose list values are the shortest. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Keys of the top 2 values

Write a Python program to find the keys of the two largest values. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Keep even numbers in list values

Write a Python program to keep only even numbers in each list value. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Print the keys

Write a Python program to print the keys of a dictionary, capitalised. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove keys whose values contain a substring

Write a Python program to remove entries whose value contains any of the given substrings. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove keys with large values

Write a Python program to remove keys whose values are greater than n. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Values for keys found in a list

Write a Python program to get the values of dictionary keys that are also in a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Nested dictionary from a list of keys

Write a Python program to nest each item of a dictionary under a key from a list. 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.