title: convert 2021-01-18T11:18:10.833876+00:00 to datetime python
body: <p>I am trying to convert the following string to datetime in python. After referring to <a href="https://stackoverflow.com/questions/41684991/datetime-strptime-2017-01-12t141206-000-0500-y-m-dthms-fz">datetime.strptime(‘2017-01-12T14:12:06.000-0500’,&#39;%Y-%m-%dT%H:%M:%S.%f%Z&#39;)</a> I am trying the below mentioned format.</p>
  <pre><code>config_current_ts = datetime.strptime(internal_config[&quot;timestamp_str&quot;], &quot;%Y:%m:%dT%H:%M:%S.%f%z&quot;)
  </code></pre>
  <p>Yet I get an error stating :</p>
  <blockquote>
  <p>ValueError: time data '2021-01-18T11:18:10.833876+00:00' does not
  match format '%Y:%m:%dT%H:%M:%S.%f%z'</p>
  </blockquote>
  <p>I am using python3.7.4. Can someone tell me how to convert this to datetime? I want to basically compare the string and current time to see which is ahead.</p>