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 articles

298 articles · page 9 of 25 · Clear filters
Python practice

Last day of a month

Write a Python program to find the last day of a month. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Is a date a weekend?

Write a Python program to check whether dates fall on a weekend. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Day of the week for a date

Write a Python program to find the weekday of a date. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Calculate age

Write a Python program to calculate a person's age on a given date. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Days between two dates

Write a Python program to count the days between two dates. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Add and subtract days

Write a Python program to find the dates 30 days after and 7 days before a date. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Parse a date string

Write a Python program to convert the string "15/08/2026 09:30" into a datetime. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Format a date

Write a Python program to print a date in several formats. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Create a date and read its parts

Write a Python program to create a date and print its year, month, day and weekday. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Group consecutive items

Write a Python program that groups log lines by level with `itertools.groupby`. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Take values while a condition holds

Write a Python program that takes Fibonacci numbers while they are below 100. 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.