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,901Articles
1,141Solved Python problems
7Topics
100%Free

Latest articles

1,901 articles · page 156 of 159
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 →
Python practice

Words that contain vowels

Write a Python program to get the words of a string that contain at least one vowel. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Is a list a palindrome?

Write a Python program to check whether a list reads the same forwards and backwards. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Elements divisible by 3 and 7

Write a Python program to get all elements divisible by both 3 and 7. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove negative values

Write a Python program to remove negative values from a list. 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.