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 37 of 159
Python practice

Insert a row with parameters

Write a Python program to insert a row safely with `?` placeholders. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Create a table

Write a Python program to create a SQLite table and list the tables in the database. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Python RegEx Programs with Solutions

20 Python regex programs with solutions: validate email, phone and password, extract numbers, dates and URLs, and clean text with re.sub.

2 min readRead →
Python practice

Multiline and ignore-case flags

Write a Python program to find lines that start with "error" in any case. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Match positions with finditer

Write a Python program to print each match of a word with its start and end positions. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Extract prices

Write a Python program to extract rupee prices like Rs 1,499.50 and add them up. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Find repeated words

Write a Python program to find accidentally repeated words like "the the". Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Validate an IPv4 address

Write a Python program to check IPv4 addresses (each part 0-255). Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

camelCase to snake_case

Write a Python program to convert camelCase names to snake_case. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Mask card numbers

Write a Python program to mask all but the last 4 digits of card numbers. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Parse log lines with named groups

Write a Python program to parse "LEVEL date message" log lines into dictionaries. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Match whole words only

Write a Python program to count the word "test" but not "testing" or "latest". 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.