Fetch the last day of the month in Python

I am a developer sharing the problems I solve through my blog. Just giving back to the community I learned so much from! Have an amazing day :)
Python does not have a simple method to fetch the last day of the month. Instead, you need to use the monthrange() method from the calendar module as shown here. Not an inconvenience really.. 🤷♂️
>>> import calendar
>>> calendar.monthrange(2022, 2)[1]
28
Thanks for reading :)




