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

Last modified time of a file

Write a Python program to get the last modified time of a file. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Creation (change) time of a file

Write a Python program to get the ctime of a file with `os.path.getctime()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Split a path

Write a Python program to split a path into folder and file name. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Number of CPUs

Write a Python program to get the number of CPUs with `os.cpu_count()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Change root with os.chroot()

Write a Python program that uses `os.chroot()` where available. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Rename with os.renames()

Write a Python program to move a file into new nested folders with `os.renames()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Rename a folder

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

1 min readRead →
Python practice

Change ownership with os.chown()

Write a Python program that changes file ownership with `os.chown()` where the platform supports...

2 min readRead →
Python practice

Change permissions with os.chmod()

Write a Python program to change a file's permissions with `os.chmod()`. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Print every nested file and folder

Write a Python program to print all nested files and folders with `os.walk()`. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Print name, path and type

Write a Python program to print the name, path and type (file or folder) of everything in a folder. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Create files with 10 extensions

Write a Python program to create sample files with 10 different extensions. 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.