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

Pair up two lists as sublists

Write a Python program to combine items at the same position of two lists into sublists. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Reverse each string in a list

Write a Python program to reverse each string in a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Difference between two lists

Write a Python program to get the items in the first list that are not in the second. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Join elements with a special character

Write a Python program to merge all elements of a list into one string using a special character. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Second smallest number

Write a Python program to find the second smallest number in a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Second largest number

Write a Python program to find the second largest number in a list (ignoring duplicates). Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sublists with 5 or more elements

Write a Python program to generate all consecutive sublists with 5 or more elements. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Does a list contain a sublist?

Write a Python program to check whether a list contains another list as a consecutive run. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

max, min and sum

Write a Python program to get the maximum, minimum and sum of a list with built-in functions. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove by index with pop()

Write a Python program to remove an element at a given index with `pop()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

sort() vs sorted()

Write a Python program to sort a list with `sort()` and with `sorted()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Add two lists with extend()

Write a Python program to add one list to another with `extend()`. 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.