[PYTHON] Generate a list packed with the number of days in the current month.

import datetime import calendar

days.py


days_list = list(set([day for day in cal.itermonthdays(
    datetime.datetime.today().year, datetime.datetime.today().month)]))[1:]

#By changing the year and month, you can get a date list of any month and day.

Recommended Posts

Generate a list packed with the number of days in the current month.
Find the number of days in a month
Get the number of specific elements in a python list
How to identify the element with the smallest number of characters in a Python list?
Get a list of packages installed in your current environment with python
Make a copy of the list in Python
Receive a list of the results of parallel processing in Python with starmap
How to get a list of files in the same directory with python
Get the value of a specific key in a list from the dictionary type in the list with Python
How to count the number of occurrences of each element in the list in Python with weight
[Homology] Count the number of holes in data with Python
Get the number of occurrences for each element in the list
A server that returns the number of people in front of the camera with bottle.py and OpenCV
I tried to get the number of days of the month holidays (Saturdays, Sundays, and holidays) with python
Generate a list of consecutive characters
Process the contents of the file in order with a shell script
If you give a list with the default argument of the function ...
Get a list of files in a folder with python without a path
Get the number of readers of a treatise on Mendeley in Python
Display a list of alphabets in Python 3
Change the list in a for statement
Count the number of characters with echo
The story of a Parking Sensor in 10 minutes with GrovePi + Starter Kit
Get the number of searches with a regular expression. SeleniumBasic VBA Python
[Python] How to put any number of standard inputs in a list
Check the in-memory bytes of a floating point number float in Python
[Introduction to Python] How to sort the contents of a list efficiently with list sort
[Linux] Command to get a list of commands executed in the past
I want to sort a list in the order of other lists
Graph the change in the number of keyword appearances per month using pandas
I made a mistake in fetching the hierarchy with MultiIndex of pandas
[Completed version] Try to find out the number of residents in the town from the address list with Python
How to pass the execution result of a shell command in a list in Python
Output the number of CPU cores in Python
[Python] Get the files in a folder with Python
Feel free to write a test with nose (in the case of + gevent)
plot the coordinates of the processing (python) list and specify the number of times in draw ()
[Python] Sort the list of pathlib.Path in natural sort
Set the number of elements in a NumPy one-dimensional array to a power of 2 (0 padded)
Get the caller of a function in Python
Calculate the total number of combinations with python
To output a value even in the middle of a cell with Jupyter Notebook
How to count the number of elements in Django and output to a template
[Python] Precautions when finding the maximum and minimum values in a numpy array with a small number of elements
Test the number of times you have thrown a query (sql) in django
Get only the subclass elements in a list
Create a BOT that displays the number of infected people in the new corona
Get a list of IAM users with Boto3
I want to see a list of WebDAV files in the Requests module
A story packed with absolute values in numpy.ndarray
Output in the form of a python array
Search by the value of the instance in the list
I wanted to know the number of lines in multiple files, so I tried to get it with a command
[Python] A program that finds the shortest number of steps in a game that crosses clouds
Consolidate a large number of CSV files in folders with python (data without header)
Find out the maximum number of characters in multi-line text stored in a data frame
How to check in Python if one of the elements of a list is in another list
[Python] Representing the number of complaints from life insurance companies in a bar graph
Find a guideline for the number of processes / threads to set in the application server
Check if the string is a number in python
Accelerate a large number of simple queries with MySQL