title: Error: TypeError: 'int' object is not callable - when using variable in range loop
body: <p>I'm trying to make a program that loops through my code a custom number of times. The code:</p>
  <pre><code>rn = int(input(&quot;Enter loop amount: &quot;))
  for x in range(0, rn):
       #my code does stuff (don't need help here)
  </code></pre>
  <p>My error is:</p>
  <blockquote>
  <p>Error: TypeError: 'int' object is not callable</p>
  </blockquote>
  <p>This may have a simple solution and if so, then I'm sorry for not knowing the answer. The error is on the line where I have my loop start. I have looked on stack overflow, and the only question that has the same error uses something called lambda (<a href="https://stackoverflow.com/questions/40306164/typeerrorint-object-is-not-callable">see it here</a>). My question was closed and I was give a question to look at <a href="https://stackoverflow.com/questions/9767391/typeerror-int-object-is-not-callable">here</a>, but I don't really understand this and it has nothing to do with my particular problem (I looked at the answers and they don't help me). I have tried setting the variable to an integer but that doesn't work. I have also looked on other websites which haven't helped. Any help would be appreciated. Thanks,</p>