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

Build a sentence from a list of words

Write a Python program to create a string from a list of words. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Palindrome words in a string

Write a Python program to get all palindrome words from a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Replace Java with Python, any case

Write a Python program to replace the word "Java" (in any letter case) with "Python". Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Extract all numbers from a string

Write a Python program to get all the numbers from a multi-line string. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Reverse the order of words

Write a Python program to rearrange a sentence so its words appear in reverse order. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Vowel count of each word

Write a Python program to count the vowels in each word and show the result as a dictionary. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Swap first and last letters of each word

Write a Python program to exchange the first and last characters of every word in a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Swap the first and last characters

Write a Python program to swap the first and last characters of a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

String length with a loop

Write a Python program to calculate the length of a string with a loop instead of `len()`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Longest and shortest word

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

1 min readRead →
Python practice

Vowel or consonant

Write a Python program to test whether a letter is a vowel or a consonant. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count occurrences of a substring

Write a Python program to count how many times a substring occurs in a string. 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.