Determine Number of Days in Year and Month

  • Share this:

Code introduction


Calculate the number of days in a given year and month.


Technology Stack : calendar

Code Type : Function

Code Difficulty : Intermediate


                
                    
def aaaa(arg1, arg2):
    def bbbb():
        import calendar
        return calendar.monthrange(arg1, arg2)[1]

    return bbbb()                
              
Tags: