Python Check if Today is Saturday or not Example
Published On: 30/09/2022 | Category:
Python

Hi Guys,
This tutorial will give you example of python check date is saturday or not. let’s discuss about python check date is saturday. if you want to see example of how to check if today is saturday in python then you are a right place. you'll learn how to check if today is saturday in python. Alright, let’s dive into the steps.
In this example, we will use DateTime library to check whether today is Tuesday or not. I will give you two simple examples one using weekday() and another using isoweekday(). so let's see both examples:
You can use these examples with python3 (Python 3) version.
So let's see bellow example:
Example 1:
main.pyfrom datetime import datetime # If today is Saturday (0 = Mon, 1 = Tue, 2 = Wen ...) if datetime.today().weekday() == 5: print("Yes, Today is Saturday") else: print("Nope...")Output:
Yes, Today is Saturday
Example 2:
main.pyfrom datetime import datetime # If today is Saturday (1 = Mon, 2 = Tue, 3 = Wen ...) if datetime.today().isoweekday() == 6: print("Yes, Today is Saturday") else: print("Nope...")Output:
Yes, Today is Saturday
It will help you....
Happy Pythonic Coding!