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

Replace several characters at once

Write a Python program to replace a with 1, t with 2 and o with 3 in one step. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Replace several words at once

Write a Python program to replace several words using a dictionary of replacements. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Split a string on vowels

Write a Python program to split a string wherever a vowel appears. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Mirror image of a string

Write a Python program to print the mirror image (reverse) of a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

First 2 and last 2 characters

Write a Python program to build a string from the first 2 and last 2 characters. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

First 4 characters

Write a Python program to get the first 4 characters of a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Words longer than n characters

Write a Python program to find the words longer than a given length. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Least frequent character

Write a Python program to find the least frequent character in a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count occurrences of a word

Write a Python program to count how many times a whole word occurs in a string. 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.