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

Print a month calendar

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

1 min readRead →
Python practice

Countdown to an event

Write a Python program that prints the days, hours and minutes until an event. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Next Monday

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

1 min readRead →
Python practice

Day of the year and week number

Write a Python program to get the day of the year and ISO week number of a date. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sort date strings

Write a Python program to sort a list of date strings in date order. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Convert time zones

Write a Python program to convert 12:00 UTC to Indian Standard Time. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Timestamps

Write a Python program to convert between a datetime and a Unix timestamp. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

All dates in a range

Write a Python program to list every date in a week. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Difference between two times

Write a Python program to find hours and minutes between two datetimes. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Count business days

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

1 min readRead →
Python practice

Add months to a date

Write a Python program to add months to a date, clamping to the month's last day. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
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 →

Preparing for a QA interview?

Take free timed mock tests with answers and explanations.