Loop to print name, removing one character at a time
<p>I'm having a little trouble creating a program which prints out the name of the user downwards that always removes the first character each row then when it's at the last letter go up again.</p>

<p>This is what i have so far: </p>

<pre><code>name = input("Put in a name: ")
name_length = len(name)

for counter in range(name_length,0, -1):    
    print(counter)
</code></pre>

<p>Below Is what it is supposed to end like</p>

<p><a href="http://i.stack.imgur.com/5rPWa.png" rel="nofollow"><img src="http://i.stack.imgur.com/5rPWa.png" alt="enter image description here"></a></p>

<p>This is an approach that just uses a single loop and slicing to achieve the same end. It creates a list of the indices at which the slice should begin, and then steps through that list printing as it goes.</p>

<pre><code>name = "Bilbo"

a = range(len(name))
a = a[:-1] + a[::-1]

for idx in a:
    print name[idx:]
</code></pre>

python for-loop