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

Capitalise the 3rd character of each word

Write a Python program to make the 3rd character of each word uppercase. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Replace a word in a list

Write a Python program to replace "Java" with "Python" in a list of words. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Dictionary from sublists

Write a Python program to create a dictionary from [key, value] sublists. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Tuples to sublists

Write a Python program to convert the tuples in a list into lists. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Flatten a nested list

Write a Python program to flatten a nested list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Palindrome strings in a list

Write a Python program to get the palindrome strings from a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Percentage from marks

Write a Python program to calculate the percentage from a list of marks out of 100 each. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Bill per fruit purchased

Write a Python program to calculate the bill for each fruit purchased, from a price list and a quantity...

1 min readRead →
Python practice

Insert a sublist at an index

Write a Python program to insert a sublist into a list at a given index. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Remove duplicates with a set

Write a Python program to remove duplicates from a list using a set. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Dictionary from two lists

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

1 min readRead →
Python practice

Remove n elements from the left or right

Write a Python program to remove n elements from the left and from the right of a list. 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.