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 79 of 140
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 →
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 →

Preparing for a QA interview?

Take free timed mock tests with answers and explanations.