How would I use a while loop so that if they enter a number it would ask them the again?
<pre><code>fn = input("Hello, what is your first name?")
firstname = (fn[0].upper())
ln = input("Hello, what is your last name?")
lastname = (ln.lower())
</code></pre>

<p>I want fn to be on a loop so that if they enter their a number instead of letters, it would repeat the question</p>

<pre><code>if result.isalpha():
   print "the string entered contains only letters !"
</code></pre>

<p>I guess ?</p>

<pre><code>a="6"
while not a.isalpha():
    a = raw_input("Enter your name:")
print "You entered:",a
</code></pre>

<p>if you just wanted to eliminate only words that contained numbers you could do</p>

<pre><code>while any(ltr.isdigit() for ltr in a):
</code></pre>

python python-3.x