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

Remove words that are dictionary keys

Write a Python program to remove words from a string if they are keys in a dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Replace words using a dictionary

Write a Python program to replace words in a string using a dictionary of replacements. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Group equal items

Write a Python program to group equal items of a list into dictionary values. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Max and min values

Write a Python program to find the maximum and minimum values of a dictionary, with their keys. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Map two lists to a dictionary

Write a Python program to map a list of keys to a list of values. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove a key

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

1 min readRead →
Python practice

Product of dictionary values

Write a Python program to multiply all the values of a dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Squares of 1 to 5

Write a Python program to create a dictionary with keys 1 to 5 and their squares as values. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Insert a key at the beginning

Write a Python program to insert a key at the beginning of a dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Dictionary of cubes

Write a Python program to create {k: k³} for k from 1 to n. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Iterate over a dictionary

Write a Python program to loop over a dictionary and print each key and value. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Does a key exist?

Write a Python program to check whether a key exists in 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.