

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is itermonthdays2() in python?
itermonthdays2().It is similar to itermonthdates(), Days returned will be tuples (i.e) it consists of a day number and a weekday number. this method is used to get an iterator for the month in the year.
Example
import calendar i= calendar.Calendar() for days in i.itermonthdays2(2019, 5): print(days)
Output
(0, 0) (0, 1) (0, 2) (0, 3) (0, 4) (0, 5) (1, 6) (2, 0) (3, 1) (4, 2) (5, 3) (6, 4) (7, 5) (8, 6) (9, 0) (10, 1) (11, 2) (12, 3) (13, 4) (14, 5) (15, 6) (16, 0) (17, 1) (18, 2) (19, 3) (20, 4) (21, 5) (22, 6) (23, 0) (24, 1) (25, 2) (26, 3) (27, 4) (28, 5) (29, 6) (30, 0) (31, 1) (0, 2) (0, 3) (0, 4) (0, 5) (0, 6)
- Related Questions & Answers
- What is immutable in Python?
- What is @ operator in Python?
- What is iterweekdays() in python?
- What is itermonthdates() in python?
- What is filter() in python?
- What is Tick in Python?
- What is TimeTuple in Python?
- What is Exception in Python?
- What is CGI in Python?
- What is Pandas in python?
- What is unexpected indent in Python?
- What is exception handling in Python?
- What is zfill() method in Python?
- What is a namespace in Python?
- What is __init__.py in Python?
Advertisements