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

Memory size of a dictionary

Write a Python program to get the memory size of a dictionary with `sys.getsizeof`, and its number of...

1 min readRead →
Python practice

Sum of dictionary values

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

1 min readRead →
Python practice

Swap the values of two keys

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

1 min readRead →
Python practice

Merge two dictionaries with **

Write a Python program to concatenate two dictionaries using unpacking. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Add a key

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

1 min readRead →
Python practice

Sort a dictionary by value

Write a Python program to sort a dictionary by its values. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sort a dictionary by key

Write a Python program to sort a dictionary by its keys. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Character counts of a string

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

1 min readRead →
Python practice

Remove duplicate values

Write a Python program to keep only the first key for each distinct value. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Clear a dictionary

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

1 min readRead →
Python practice

Squares of even, cubes of odd

Write a Python program that stores squares of even numbers and cubes of odd numbers in a dictionary using a...

1 min readRead →
Python practice

Dictionary from two lists

Write a Python program to create a dictionary from a list of keys and a list of values. 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.