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 35 of 95 · Clear filters
Python practice

Frequency of tuple elements

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

1 min readRead →
Python practice

Sort tuples by length

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

1 min readRead →
Python practice

Sort tuples by the second item

Write a Python program to sort a list of tuples by their second item. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sort tuples by the first item

Write a Python program to sort a list of tuples by their first item. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove tuples that are all None

Write a Python program to remove tuples in which every element is None. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove tuples containing None

Write a Python program to remove tuples that contain None. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove tuples of a given length

Write a Python program to remove tuples of length i from a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Group a list of pairs into a dictionary

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

1 min readRead →
Python practice

Reverse a tuple

Write a Python program to reverse a tuple. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Tuple of pairs to a dictionary

Write a Python program to convert a tuple of (value, key) pairs into a dictionary keyed by the second...

1 min readRead →
Python practice

Length of a tuple

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

1 min readRead →
Python practice

Index of an element

Write a Python program to find the index of an element in a tuple. 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.