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

Characters at odd indexes

Write a Python program to print the characters at odd index positions. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count consonants

Write a Python program to count the consonants in a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count vowels

Write a Python program to count the vowels in a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Does a string contain a number?

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 →
Python practice

Characters at even indexes

Write a Python program to print the characters at even index positions (0, 2, 4, ...). Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Combine two strings

Write a Python program to combine two strings into one. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Frequency of each character

Write a Python program to count how often each character appears in a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Length of a string

Write a Python program to calculate the length of a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Reverse each word

Write a Python program to reverse each word of a string, keeping the word order. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Check a palindrome string

Check whether a given string is a palindrome. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Smallest and largest word

Write a Python program to find the smallest and largest word in a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Common words in two strings

Write a Python program to find the words that appear in both strings, ignoring punctuation. 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.