Question: Is there a simple way to state that 

```
a = '2020-01-01 19:30:33.996628' 
b = '2020-01-01 19:30:34' 

```

`a` and `b` are equal. If the time resolution of `a` is changed to second, then `a` could be equal to `b`. How to implement it with code?

Answer: 
if you treat both of them as `datetime` objects, you can use arithmetic operators on them. For example, you can subtract them and check if the result satisfy a condition (like less then one minute different) as you wise
An easier way to use rounding for comparison:-

```
import datetime
from dateutil import parser

a = '2020-01-01 19:30:33.996628' 
b = '2020-01-01 19:30:34' 

a = parser.parse(a)
b = parser.parse(b)

a == b
False

format_str = '%Y-%m-%d %H:%M'

a_rounded = datetime.datetime.strptime(datetime.datetime.strftime(a, format_str), format_str)
b_rounded = datetime.datetime.strptime(datetime.datetime.strftime(b, format_str), format_str)

a_rounded == b_rounded
True

```

To this you can add flexibility according to your need like I have rounded up to comparison in `Minutes`.
So in your case the format\_str would be like this:-

```
format_str = '%Y-%m-%d %H:%M:%S'

```