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 77 of 95 · Clear filters
Python practice

Count letters and digits

Write a Python program that counts the letters and digits in a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Convert uppercase letters to lowercase

Write a Python program that converts all uppercase letters in a word to lowercase, using a loop. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

FizzBuzz from 1 to 30

Write a Python program that prints 1 to 30, but "Fizz" for multiples of 3, "Buzz" for multiples of 5 and "FizzBuzz" for multiples of...

1 min readRead →
Python practice

Fibonacci series up to 20

Write a Python program to print the Fibonacci series from 0 to 20. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Print 0 to 6 except 3 and 6

Write a Python program that prints all the numbers from 0 to 6 except 3 and 6. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count even and odd numbers

Write a Python program to count the even and odd numbers in a series. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Build a string character by character

Write a Python program that adds each character of a word from the user to an empty string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Star pattern that grows then shrinks

Write a Python program to print a star pattern that grows from 1 to 5 stars and shrinks back to 1, using nested...

1 min readRead →
Python practice

Extract 10-digit mobile numbers

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

1 min readRead →
Python practice

Extract email addresses

Write a Python program to extract all email addresses from a string. 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 on its own line. 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.