title: \n in return statement of function prints \n instead of new line in python
body: <p>Consider the below python code.I am very new to python.Please help me with this.
  this function returns 
  '\n56' 
  but i need 
  --new line--
  56</p>
  
  <pre><code>def fun_ret(num):
      return '\n'+str(num)
  if __name__=='__main__':
      a=fun_ret(56)
  </code></pre>
  
  <p>I have gone through similar posts but it was all about print statement</p>
  
  <p>Actual scenario is to pass the doctest of method <strong>str</strong> in a class.</p>
  
  <pre><code>def __str__(self):
      """(Maze)--&gt;str
      The parameter represents a maze. Return a string representation of the maze 
      &gt;&gt;&gt; maze=Maze([['#', '#', '#', '#', '#', '#', '#'],['#', 'J', '.', '.', 'P', '.', '#'], ['#', '.', '#', '#', '#', '.', '#'],['#', '.', '.', '@', '#', '.', '#'],['#', '@', '#', '.', '@', '.', '#'], ['#', '#', '#', '#', '#', '#', '#']], Rat('J', 1, 1),Rat('P', 1, 4))
      &gt;&gt;&gt; str(maze)
      "#######
      #J..P.#
      #.###.#
      #..@#.#
      #@#.@.#
      #######
      J at (1, 1) ate 0 sprouts.
      P at (1, 4) ate 0 sprouts."
      """
      result=''
      for outer_list in self.maze_content:
          for inner_list in outer_list:
              result +='{0}'.format(str(inner_list))
          result+='\n'
      result += '\n'+'{0} at ({1}, {2}) ate {3} sprouts.'.format(self.rat_1.symbol,self.rat_1.row,self.rat_1.col,self.rat_1.num_sprouts_eaten)
      result += '\n'+('{0} at ({1}, {2}) ate {3} sprouts.'.format(self.rat_2.symbol,self.rat_2.row,self.rat_2.col,self.rat_2.num_sprouts_eaten))
      return result
  
  
  if __name__=='__main__':
      import doctest
      doctest.testmod()
  </code></pre>