Check if a day is weekday or weekend in Python Subash Chandran 16th December 2020 Leave a Comment Advertisements from datetime import datetime d = datetime(2020, 12, 25); if d.weekday() > 4: print 'Given date is weekend.' else: print 'Given data is weekday.' Curly hair, very fair, please share 🙂Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Reddit (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email this to a friend (Opens in new window) Snippets Convert a date to its ISO-8601 equivalent in Python, Convert a dictionary to a list of tuples in Python, convert date to iso format python, convert dictionary to list python, date to iso format in python, day weekend or weekday python, decimal to binary python, decimal to hex python, decimal to hexadecimal python, get unique elements from array, get unique elements python, Learn how to check if a day is weekday or weekend in Python., list set python, list transpose python, remove duplicates list, Shuffle a list using Fisher-Yates algorithm in Python, shuffle list python, Sort a dictionary by key in Python, transpose a list in python Change font size A Decrease font size. A Reset font size. A Increase font size.