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

Depth of a nested dictionary

Write a Python program to find the depth of a nested dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Length of each value

Write a Python program to map each string value to its length. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Values for one key from a list of dicts

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

1 min readRead →
Python practice

Update list values

Write a Python program to add 10 to every number in the first list and subtract 25 from the second. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Empty every list value

Write a Python program to clear the list values in a dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Convert string values to numbers

Write a Python program to convert the string values of a dictionary to int or float. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove a dictionary from a list

Write a Python program to remove the 4th dictionary from a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Dict of lists to list of dicts

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

1 min readRead →
Python practice

Group key-value pairs into lists

Write a Python program to group a sequence of (key, value) pairs into a dictionary of lists. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Are all values the same?

Write a Python program to check whether all values in a dictionary are the same. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Matrix rows to a dictionary

Write a Python program to convert a matrix into a dictionary keyed by row number. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

String to a dictionary

Write a Python program to convert "key=value; key=value" text into a dictionary. 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.