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

Python sys Module Programs with Solutions

20 Python sys module programs with solutions: argv, exit codes, stdin, stdout, stderr, sys.path, version checks and getsizeof, each explained.

3 min readRead →
Python practice

Arguments with argparse

Write a Python program that parses named options with argparse. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Exit with a message

Write a Python program that stops with a message when a required file is missing. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Byte order and encoding

Write a Python program that prints the machine's byte order and the default text encoding. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Which Python is running?

Write a Python program that checks which interpreter file is running. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Float limits

Write a Python program that prints the largest float and float precision. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Largest list index

Write a Python program that prints `sys.maxsize` and shows ints can be bigger. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Recursion limit

Write a Python program that reads the recursion limit and handles RecursionError. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Size of objects

Write a Python program that compares the memory size of a few objects. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Which modules are loaded?

Write a Python program that checks whether a module has been imported yet. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Import from a custom folder

Write a Python program that adds a folder to `sys.path` and imports a module from it. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Inspect sys.path

Write a Python program that shows how many folders Python searches for modules. 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.