title: how to solve 'datetime.datetime' object is not iterable' TypeError
body: <p>I have a piece of code iterating though a number of files in an AWS S3 folder. I want to collect the last modified datetimestamps for all objects and be able to sort them in ascending or descending order.
  my code looks like this:</p>
  
  <pre><code>import boto3
  
  s3 = boto3.resource('s3')
  my_bucket = s3.Bucket('myS3bucket')
  
  for my_bucket_object in my_bucket.objects.all():
      if my_bucket_object.key.startswith('inbox/'):
          changedate_dt = my_bucket_object.last_modified
          changedate_str = sorted(changedate_dt, reverse=False)
          print(changedate_str)
  </code></pre>
  
  <p>I am getting the error:</p>
  
  <blockquote>
    <p>TypeError: 'datetime.datetime' object is not iterable</p>
  </blockquote>
  
  <p>how can I solve this?</p>