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

Tuple of digits to a number

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

1 min readRead →
Python practice

Tuple of strings to integers

Write a Python program to convert a tuple of numeric strings to integers, ignoring stray commas. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

String to a tuple of characters

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

1 min readRead →
Python practice

Product of a tuple

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

1 min readRead →
Python practice

Count elements before a tuple

Write a Python program to count the elements of a list until the first tuple is reached. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sort tuples by a float element

Write a Python program to sort tuples by their float element. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove empty tuples

Write a Python program to remove empty tuples (and tuples holding only an empty string) from a...

1 min readRead →
Python practice

Tuple to a string

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

1 min readRead →
Python practice

Are all tuple elements distinct?

Write a Python program to test whether all elements of a tuple are distinct. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Tuple at a given position

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

1 min readRead →
Python practice

How often each tuple appears

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

1 min readRead →
Python practice

Tuples with more than 3 elements

Write a Python program to keep tuples with more than 3 elements. 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.