title: How to add prefix and suffix to a string in python
body: <pre><code>#!/usr/bin/python
  import sys,re
  import subprocess
  
  def funa():
          a = str(raw_input('Enter your choice [PRIMARY|SECONDARY]: ')).upper().strip()
          p = re.compile(r'.*'+a+'.*')
          result = p.findall(a)
          str1 = ''.join(result)
          print str1
  funa()
  </code></pre>
  
  <p>I have above code in test.py file and When I run this code and give my choice as SECONDARY, I am getting the output SECONDARY as string:</p>
  
  <p><code>[oracle@localhost oracle]$ ./test.py
  Enter your choice [PRIMARY|SECONDARY]: SECONDARY
  SECONDARY</code></p>
  
  <p>I want to add prefix as '^' and suffix as '$' to add in my output. Which should be a string only. Means I want to get the output as :</p>
  
  <p><strong>^SECONDARY$</strong></p>
  
  <p>Please let me know how can I achieve this.</p>