![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get first day of the week using Python?
You can use the calender module to get the first day of the week using Python. The calender module has a special function, firstweekday(), that returns the current setting for the weekday to start each week.
Example
import calendar print(calendar.firstweekday()) calendar.setfirstweekday(2) print(calendar.firstweekday())
Output
This will give the output −
6 2
Advertisements