Print next 30 days starting from today

Print next 30 days starting from today

  • In this topic, we learn how to write a python program to print 30 days starting from today.

Source Code:

import datetime
base = datetime.datetime.today()
for x in range(0, 30):
      print(base + datetime.timedelta(days=x))



Comments