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

Count lowercase letters in a file

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

1 min readRead →
Python practice

Count uppercase letters in a file

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

1 min readRead →
Python practice

Count characters in a file

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

1 min readRead →
Python practice

Merge two files

Write a Python program to read two files and write their contents into a new file. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Characters of a file into a list

Write a Python program to extract the characters (not spaces or newlines) of a file into a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Is a file closed?

Write a Python program to check whether a file is closed. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Write a tuple to a file

Write a Python program to write a tuple to a file and read it back. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Size of a file

Write a Python program to get the size of a file in bytes. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count lines in a file

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

1 min readRead →
Python practice

Compare two files

Write a Python program to compare two files and show the lines that differ. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Mobile numbers from a file

Write a Python program to get all 10-digit mobile numbers from a file. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Odd and even length words

Write a Python program to put the words of a file into two lists by odd and even length. 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.