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

Pick random numbers from a list

Write a Python program to select 4 random numbers from a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Insert an item at an index

Write a Python program to insert an item at a specific position. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Split a list at a given length

Write a Python program to split a list into two parts where the first part has a given length. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Pack consecutive duplicates

Write a Python program to pack consecutive duplicates into sublists. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove consecutive duplicates

Write a Python program to remove consecutive duplicates from a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count empty dictionaries

Write a Python program to count the empty dictionaries in a list (ignoring other empty containers). Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Items starting with a letter

Write a Python program to find the items that start with a given character. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sublist with the highest sum

Write a Python program to find the sublist whose elements add up to the highest total. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Move zeros to the end

Write a Python program to move all zeros to the end of a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Positives left, negatives right

Write a Python program to move all positive numbers to the left and negative numbers to the right, keeping their...

1 min readRead →
Python practice

Iterate two lists at once

Write a Python program to iterate over two lists simultaneously and build a list of pairs. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Add a prefix to every item

Write a Python program to insert a string at the beginning of every 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.