title: str object not callable when converting int variable to using str function
body: <p>I'm sorry if this was asked already I have been sifting through past questions and cannot seem to find an answer. I am fairly new at python too. </p>
  
  <p>What I am trying to do is write the word and r and c variable to an output file but formatted with a space between the word and variable (the format being the longest word of list - word I am looking at).</p>
  
  <p>I have tried this, yet it comes up with a "str object not callable"</p>
  
  <pre><code>row_variable = str(r)
  </code></pre>
  
  <p>Here is the traceback when i tried it:</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:\CS303E\WordSearch.py", line 106, in &lt;module&gt;
    main ()
  File "C:\CS303E\WordSearch.py", line 84, in main
    output.write(list_of_words[i]+spaces+str(row_variable)+str(column_variable))
  TypeError: 'str' object is not callable
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code># Find longest word in list of words
  max_length = 0
  for i in list_of_words:
    if len(i) &gt; max_length:
      max_length = len(i)
  # Open output file found.txt
  output = open('found.txt','w')
  
  # Check for list of words
  for i in range(len(list_of_words)):
    flag = False
    for j in range(len(rows)):
      if list_of_words[i] in rows[j]:
        r = j + 1
        c = rows[j].find(list_of_words[i]) + 1
        num_spaces = max_length - len(list_of_words[i])
        spaces = ' ' * num_spaces
        output.write(list_of_words[i])
        flag = True
    for j in range(len(rev_rows)):
      if list_of_words[i] in rev_rows[j]:
        r = j + 1
        c = num_col - rev_rows[j].find(list_of_words[i])
        print(list_of_words[i], r, c)
        flag = True
    for j in range(len(columns)):
      if list_of_words[i] in columns[j]:
        r = j + 1
        c = columns[j].find(list_of_words[i]) + 1
        print(list_of_words[i], c, r) 
        flag = True
    for j in range(len(rev_columns)):
      if list_of_words[i] in rev_columns[j]:
        r = j + 1
        c = num_col - rev_rows[j].find(list_of_words[i])
        print(list_of_words[i], c, r)
        flag = True
    if flag != True:
      print (list_of_words[i],0,0)
  </code></pre>