I want to split a sentence into words and get it to display vertically
<p>This is what i have so far.</p>

<pre><code>sentence = input("Enter a sentence".lower())
sentence = sentence.split()
print (sentence)
</code></pre>

<p>Current output:</p>

<pre><code>enter a sentence hi my name is bob

['hi', 'my', 'name', 'is', 'bob']
</code></pre>

<p>Desired output (without those big spaces)</p>

<pre><code>hi

my

name

is

bob
</code></pre>

<p>I think it involves <strong>for word in sentance</strong> but im not sure</p>

<p>Thanks!</p>

<p>You can specify the <code>end</code> argument for <code>print</code> to get the spacing you desire from a single print statement. The default is a single newline: <code>'\n'</code></p>

<pre><code>for word in sentence:
    print(word, end="\n\n")
</code></pre>

<p>Edit: oops, missed the <code>out</code> in <code>without</code></p>

<blockquote>
  <p>Desired output (<strong>without</strong> those big spaces)</p>
</blockquote>

<p>All the same, you can specify any end you want in Python3's print function. If you wanted to print it out as if it were a sentence, you could make the end character a space. </p>

<p><strong>Alternatively, you can use the <code>join</code> method of a string to join elements of an iterable to a string.</strong></p>

<pre><code>print("\n".join(sentence))
#or more explicitly:
print("\n".join(word for word in sentence))
</code></pre>

python python-3.x