The program prints all the Sundays in the year 2023. Here's how it works:
import datetime year = '2023' for week in range(53): print(datetime.datetime.strptime(year+str(week)+'0', '%Y%W%w'))
2023-01-01 00:00:00 2023-01-08 00:00:00 2023-01-15 00:00:00 2023-01-22 00:00:00 2023-01-29 00:00:00 2023-02-05 00:00:00 2023-02-12 00:00:00 2023-02-19 00:00:00 2023-02-26 00:00:00 2023-03-05 00:00:00 2023-03-12 00:00:00 2023-03-19 00:00:00 2023-03-26 00:00:00 2023-04-02 00:00:00 2023-04-09 00:00:00 2023-04-16 00:00:00 2023-04-23 00:00:00 2023-04-30 00:00:00 2023-05-07 00:00:00 2023-05-14 00:00:00 2023-05-21 00:00:00 2023-05-28 00:00:00 2023-06-04 00:00:00 2023-06-11 00:00:00 2023-06-18 00:00:00 2023-06-25 00:00:00 2023-07-02 00:00:00 2023-07-09 00:00:00 2023-07-16 00:00:00 2023-07-23 00:00:00 2023-07-30 00:00:00 2023-08-06 00:00:00 2023-08-13 00:00:00 2023-08-20 00:00:00 2023-08-27 00:00:00 2023-09-03 00:00:00 2023-09-10 00:00:00 2023-09-17 00:00:00 2023-09-24 00:00:00 2023-10-01 00:00:00 2023-10-08 00:00:00 2023-10-15 00:00:00 2023-10-22 00:00:00 2023-10-29 00:00:00 2023-11-05 00:00:00 2023-11-12 00:00:00 2023-11-19 00:00:00 2023-11-26 00:00:00 2023-12-03 00:00:00 2023-12-10 00:00:00 2023-12-17 00:00:00 2023-12-24 00:00:00 2023-12-31 00:00:00
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions