title: Dictionary output on one line
body: <p>I'm a beginner learning Python 3.3 through <a href="http://GrokLearning.com" rel="nofollow noreferrer">http://GrokLearning.com</a></p>
  
  <p>My objective is to write a Word2SMS program. The program tells the user which "number buttons" to press on basic cell phones (non-smartphones) in order to spell out a given word. The input word will be given in all uppercase letters - no numbers or punctuation. Assume the phone can perfectly predict the word given corresponding number input from the user.</p>
  
  <p><strong>Sample goal output:</strong></p>
  
  <pre><code>&gt; GROK
  4765
  </code></pre>
  
  <hr>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>KEYPAD = {'A': '2', 'B': '2', 'C': '2', 'D': '3', 'E': '3', 'F': '3', 'G': '4', 'H': '4', 'I': '4', 'J': '5', 'K': '5', 'L': '5', 'M': '6', 'N': '6', 'O': '6', 'P': '7', 'Q': '7', 'R': '7', 'S': '7', 'T': '8', 'U': '8', 'V': '8', 'W': '9', 'X': '9', 'Y': '9', 'Z': '9'}
  word = input("Enter word: ")
  for key in word:
      print(KEYPAD[key], end='')
  </code></pre>
  
  <hr>
  
  <p><strong>The result:</strong></p>
  
  <p>My code returns the same digits, all on one line, with no whitespace between the digits, just as I want. However, I receive this notification: <strong><em>Your output is missing a trailing newline character.</em></strong> </p>
  
  <p><img src="https://i.stack.imgur.com/0syLH.png" alt="Missing trailing newline character"></p>
  
  <p>I've tried adding <code>'\n'</code> to add a new line at the end; this gives me <em>unexpected character after line continuation character</em> SyntaxError. </p>
  
  <p>Adding <code>' '</code> at the end results in one digit per line.</p>
  
  <hr>
  
  <p>For reference, I have gone through all of the free modules, but not any of the paid ones. Since my knowledge is limited, please explain your answer in simple terms.</p>