title: Python3.6 - TypeError: 'int' object is not subscriptable
body: <p>Trying to do the addition of given integer such as 123435 = (1+2+3 = 6) and (4+3+5 = 12) and checking they are equal or not. I am facing an error in following code. I am using python 3.6</p>
  
  <pre><code>def isEqual(n):
      num = int(n)
      val = len(str(n))
      mid = len(str(val))//2
      return sum(num(val[:mid])) == sum(num(val[mid:]))
  
  print(isEqual(132435))
  </code></pre>