title: Why using an equality with a list doesn't work?
body: <p>I tried for the last hour to do a basic thing with list, but it doesn't work, and I can't find out why</p>
  
  <pre><code>x = -5000
  code = (str("{:07.0f}".format(abs(x)))
  if code[3] == 5:
      print("1")
  else:
      print("2")
  </code></pre>
  
  <p>When I run this, the value in code is 0005000. If I do <code>print(code_background_x[3])</code>, the output will be 5, but when I. run the program, the output is 2. What am I doing wrong here?</p>