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

Python Set Programs with Solutions

48 Python set programs with solutions: create, add, remove, union, intersection, difference, subset, superset, frozenset and more, each explained.

5 min readRead →
Python practice

Sort lines by length

Write a Python program to sort the lines of a file by their length. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Replace spaces with underscores

Write a Python program to replace every space in a file with an underscore. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Words shorter than 5 characters

Write a Python program to display the words of a file that have fewer than 5 characters. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Drop lines containing ‘t’

Write a Python program to copy a file to another file, skipping lines that contain the letter "t". Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count consonants in a file

Write a Python program to count the consonants in a file. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count vowels in a file

Write a Python program to count the vowels in a file. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Read a file in reverse

Write a Python program to print the lines of a file in reverse order, and the whole text reversed. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Move the cursor with seek()

Write a Python program to move the cursor to a specific position in a file. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Cursor position with tell()

Write a Python program to find the current cursor position in a file. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count special characters in a file

Write a Python program to count special characters (not letters, digits or whitespace) in a file. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count digits in a file

Write a Python program to count the digits in a file. 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.