Program - function to print yesterday and tomorrow date


Topic: Program - function to print yesterday and tomorrow date

Solution

def tmrw_yest_time()
    import datetime
    yesterday = datetime.datetime.now() - datetime.timedelta(1)
    tmrw = datetime.datetime.now() + datetime.timedelta(1)
    print( yesterday, tmrw )



List all Python Programs