title: Reason of TypeError: unsupported operand type(s) for +: 'int' and 'str' in python
body: <pre><code>A= [i for i in range(256)]
  
  data = input()
  dataList = list(data)
  n=256
  B = [i%len(dataList) for i in range(n)]
  </code></pre>
  <p>Through this code,</p>
  <pre><code>A = [0,1,2,....255]  
  B = [0,1,2,3,0,1,...3] # this depends on the lenght of the input (here used 'toto' as input
  </code></pre>
  <p>I got the above result.</p>
  <pre><code>j=0
  for i in range(255):
      j = (j+A[i]+B[i])%256
      B[i], B[j] = B[j], B[i]
  </code></pre>
  <p>However, when trying to do the above operation based on these two lists(A,B), TypeError: unsupported open type(s) for +: 'int' and 'str' errors occured. I thought it was definitely an element type problem of A or B. So I also tried,</p>
  <pre><code>int_list = map(str, B)
  </code></pre>
  <p>but the problem still occurs.What I want is the &quot;j = (j+S[i]+T[i])%256 operation&quot; to work properly.</p>