How to create a list of date time in Python

1 Answer

0 votes
timestamp = [
    "2020-06-10 17:05:30",
    "2020-06-10 17:05:29",
    "2020-06-10 17:04:21",
    "2020-06-10 17:04:22",
    "2020-05-10 17:08:19",
    "2020-05-10 17:08:21",
    "2020-05-10 17:08:18",
    "2020-05-10 17:09:00",
    "2020-04-10 17:11:02",
    "2020-04-10 17:11:01"
]

for dt in timestamp:
    print(dt)
    

    
'''
run:

2020-06-10 17:05:30
2020-06-10 17:05:29
2020-06-10 17:04:21
2020-06-10 17:04:22
2020-05-10 17:08:19
2020-05-10 17:08:21
2020-05-10 17:08:18
2020-05-10 17:09:00
2020-04-10 17:11:02
2020-04-10 17:11:01

'''

 



answered Jun 10, 2020 by avibootz
...