title: Is (array[i]=="1") faster than (array[i]=='1') in python?
body: <p>Using</p>
  <pre><code>if(array[i]==&quot;1&quot;)
  </code></pre>
  <p>passes all test cases (in Hacker rank).</p>
  <p>But</p>
  <pre><code>if(array[i]=='1')
  </code></pre>
  <p>doesn't pass all the test cases.</p>
  <p>What are the differences between <code>&quot;&quot;</code> and <code>''</code> in Python?<br />
  Why does the latter take more time?</p>
  <p>Here are the screenshots:</p>
  <p>Using single-quotes:<br />
  <a href="https://i.stack.imgur.com/BVmuB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BVmuB.png" alt="HackerRank code and error using double-quotes" /></a></p>
  <p>Using double-quotes:<br />
  <a href="https://i.stack.imgur.com/enCS4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/enCS4.png" alt="HackerRank code and error using single-quotes" /></a></p>
  <p>The code:</p>
  <pre><code>#!/bin/python3
  
  import math
  import os
  import random
  import re
  import sys
  
  #
  # Complete the 'acmTeam' function below.
  #
  # The function is expected to return an INTEGER_ARRAY.
  # The function accepts STRING_ARRAY topic as parameter.
  #
  
  def acmTeam(topic):
      m=0
      count=0
      for i in range(len(topic)):
          for j in range(i+1,len(topic)):
              k=(bin(int(topic[i],2) | int(topic[j],2)))[2:]
              # if k&gt;m:
              #     m=k
              #     count=1
              # elif m==k:
              #     count+=1
              val=0
              for ind in range(len(k)):
                  if (k[ind]==&quot;1&quot;):
                      val+=1
              if val&gt;m:
                  count=1
                  m=val
              elif val==m:
                  count+=1
  
      return [m,count]
                 
  </code></pre>