I have a datetime object with integer number of seconds (ex: `2010-04-16 16:51:23`). I am using the following command to extract exact time

```
dt = datetime.datetime.strptime(time, '%Y-%m-%d %H:%M:%S.%f

```

(generically, I have decimals (ex: `2010-04-16 16:51:23.1456`) but sometimes I don't. So when I run this command, I get an error message

```
ValueError: time data '2010-04-16 16:51:23' does not match format '%Y-%m-%d %H:%M:%S.%f'

```

How do I go about resolving this?