I\'m trying to find last business day of of the month. I wrote the code below for that and it works fine but I was wondering if there is a cleaner way of doing it?
For one-liner fans:
import calendar def last_business_day_in_month(year: int, month: int) -> int: return max(calendar.monthcalendar(year, month)[-1:][0][:5])