title: Python3 getting list item index returning empty error
body: <p>code:</p>
  
  <pre><code>            other_users=User.objects.filter(logged_in=False)
  
              for other_user in other_users:
                  other_posts=Post.objects.filter(author=other_user)
                  print('[!] Collecting other_posts from other_user =&gt; {} [{}] [!]'.format(other_user,other_posts))
                  try:
                      for other_post in other_posts:
                          print('[=] other_post: {}'.format(other_post))
                          if other_post.likes==0:
                              print('[=] other_post with 0 likes: {}'.format(other_post))
                              for like in range(max_likes_per_user):
                                  rand_post=random.choice(other_posts)
                                  print('[+] Random post =&gt; {} : TYPE[{}]'.format(rand_post,type(rand_post)))
                                  post_index=other_posts.index(rand_post)
                                  print('[!] Post index: {}'.format(post_index))
                                  other_posts.pop(post_index)
                                  print('[+] Liking {} POST'.format(rand_post))
                                  rand_post.likes+=1
                                  rand_post.save()
                                  print('[!] Saving like [!]')
                  except Exception as e:
                      print('[-] Error: [-]\n\n'.format(e))
                      done=True
  </code></pre>
  
  <p>I'm trying to figure out where the problem is for the last 1h and still can't find it.</p>
  
  <p>I'm trying to get the index of a random choice from a list, but whenever I get to that part, program exits with empty error.</p>
  
  <p>The part:</p>
  
  <pre><code>post_index=other_posts.index(rand_post)
  print('[!] Post index: {}'.format(post_index))
  </code></pre>
  
  <p>and anything after that is not returning anything, and skipping directly towards Exception, however, e variable is always empty and I'm not getting the error output.</p>
  
  <p>I'd like to know why is the post_index variable not getting any data and why is it skipping to Exception part. What seem to be bad in the code?</p>
  
  <p>These are the outputs I get:</p>
  
  <pre><code>[!] Collecting other_posts from other_user =&gt; Robot Tyler 1 [&lt;QuerySet [&lt;Post: Robot Tyler 1 - Title 1&gt;, &lt;Post: Robot Tyler 1 - Title 2&gt;, &lt;Post: Robot Tyler 1 - Title 3&gt;, &lt;Post: Robot Tyler 1 - Title 4&gt;]&gt;] [!]
  [=] other_post: Robot Tyler 1 - Title 1
  [=] other_post with 0 likes: Robot Tyler 1 - Title 1
  [+] Random post =&gt; Robot Tyler 1 - Title 4 : TYPE[&lt;class 'person.models.Post'&gt;]
  [-] Error: [-]
  
  
  [!] Collecting other_posts from other_user =&gt; Robot Tyler 2 [&lt;QuerySet [&lt;Post: Robot Tyler 2 - Title 1&gt;, &lt;Post: Robot Tyler 2 - Title 2&gt;, &lt;Post: Robot Tyler 2 - Title 3&gt;]&gt;] [!]
  [=] other_post: Robot Tyler 2 - Title 1
  [=] other_post with 0 likes: Robot Tyler 2 - Title 1
  [+] Random post =&gt; Robot Tyler 2 - Title 1 : TYPE[&lt;class 'person.models.Post'&gt;]
  [-] Error: [-]
  </code></pre>
  
  <p>Anyone could tell me where the mistake is?</p>