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

Python practice articles

1,137 articles · page 72 of 95 · Clear filters
Python practice

First 20 natural numbers with while

Write a Python program to print the first 20 natural numbers using a while loop. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Print keys and values

Write a Python program to print the keys and values of a dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Print the values of a dictionary

Write a Python program to print the values of a dictionary, capitalised. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Print the keys of a dictionary

Write a Python program to print the keys of a dictionary using a loop. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Odd numbers 1-10 into a list

Write a Python program that adds the odd numbers from 1 to 10 into an empty list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Even numbers 1-10 into a list

Write a Python program that adds the even numbers from 1 to 10 into an empty list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Each character on a new line

Write a Python program to print each character of a string on a new line. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Display numbers from a list

Write a Python program to display the numbers of a list separated by commas. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

First 20 natural numbers

Write a Python program to print the first 20 natural numbers with a for loop, separated by commas. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Table of 5 with a for loop

Write a Python program to print the multiplication table of 5 with a for loop. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Star triangle up and down

Write a Python program to print stars growing from 1 to 5 and back to 1. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Does a string contain a digit?

Write a Python program to check whether a string contains a digit. 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.