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

Run another Python script

Write a Python program that runs another Python script. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Create a full path with os.makedirs()

Write a Python program to create every folder of a path with `os.makedirs()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

List files with os.scandir()

Write a Python program to scan a folder and print all file names with `os.scandir()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Change the working directory

Write a Python program to change the current working directory. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

File size with os.path.getsize()

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

Check read permission

Write a Python program to check read and write permission on a path with `os.access()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Random bytes with os.urandom()

Write a Python program to get random bytes with `os.urandom()` and turn them into a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Folders searched for programs

Write a Python program to list the folders searched for executables with `os.get_exec_path()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

System and Python version

Write a Python program to get operating system and Python version information. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Read command-line arguments

Write a Python program that reads arguments passed on the command line. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Run a system command

Write a Python program to run an operating system command and read its output. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Backup sorted by extension

Write a Python backup program that copies every file into a folder named after its extension. Step-by-step explanation, colour-coded code and real output.

2 min readRead →

Preparing for a QA interview?

Take free timed mock tests with answers and explanations.