title: Convert text to Braille (Unicode) in Python
body: <p>According to <a href="https://en.wikipedia.org/wiki/Braille_Patterns" rel="nofollow noreferrer">Wikipedia</a>, the Unicode block for braille is U+2800 .. U+28FF.</p>
  
  <p>I'm trying to convert normal text to Braille symbols (dots). To do so, I'm mapping this string:</p>
  
  <pre><code>" A1B'K2L@CIF/MSP\"E3H9O6R^DJG&gt;NTQ,*5&lt;-U8V.%[$+X!&amp;;:4\\0Z7(_?W]#Y)="
  </code></pre>
  
  <p>The reason for mapping this specific string is mentioned <a href="https://en.wikipedia.org/wiki/Braille_ASCII#Braille_ASCII_values" rel="nofollow noreferrer">on this Wikipedia page</a></p>
  
  <p>My code:</p>
  
  <pre><code>def toBraille(c):
  unic=2800
  mapping = " A1B'K2L@CIF/MSP\"E3H9O6R^DJG&gt;NTQ,*5&lt;-U8V.%[$+X!&amp;;:4\\0Z7(_?W]#Y)="
  i = mapping.index(c.upper())
  if (i&gt;0):
      unic+=i 
      unichex = hex(unic)
      return unichr(unichex))
  if (i==0):
      return '_'
  if (i&lt;O):
      return '?'
  
  def converter(txt):
  tmp=""
  for x in txt:
      tmp+=str(toBraille(x))
  return tmp
  
  txt = raw_input("Please insert text: \n")
  print(converter(txt))
  </code></pre>
  
  <p>I want to print braille characters like this</p>
  
  <pre><code>input = hello world
  output = ⠓⠑⠇⠇⠕ ⠺⠕⠗⠇⠙
  </code></pre>
  
  <p>The problem is my output looks like this</p>
  
  <pre><code>Input = A
  Output = 2801
  </code></pre>