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

List of lists to tuple of tuples

Write a Python program to convert a list of lists into a tuple of tuples. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Insert a string after every element

Write a Python program to convert a tuple into a list with a string after every element. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Flatten tuples into a string

Write a Python program to flatten a list of tuples into a space-separated string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Flatten a list of lists into a tuple

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

1 min readRead →
Python practice

Multiply the ith element of each tuple

Write a Python program to multiply the elements at index i of every tuple. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Unique digits from tuples

Write a Python program to extract the unique digits of all numbers in a list of tuples. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove duplicates from a tuple

Write a Python program to remove duplicates from a tuple, keeping the order. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Tuples with no negative elements

Write a Python program to find tuples whose elements are all zero or positive. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Tuples with a negative element

Write a Python program to find tuples that contain at least one negative number. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Tuples whose items are all divisible by 5

Write a Python program to find the tuples whose elements are all divisible by a number. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

List of tuples to list of lists

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

1 min readRead →
Python practice

Element-wise sum of tuples

Write a Python program to add several tuples element by element. 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.