title: How can I edit this code so that it prints the result a certain way?
body: <p>I'm trying to get this code:</p>
  <pre><code>line = input(&quot;String: &quot;)
  letters = &quot;&quot;
  words = line.split()
  for word in words:
      letters = letters + word[0]
  print(&quot; &quot;.join(letters))
  
  String = I have a dog
  Result: I h a d
  </code></pre>
  <p>To print the result like this:</p>
  <pre><code>I
  h
  a
  d
  </code></pre>