Python Indexing not returning expected value
<p>I am trying to return the value M from Mr. Smith but whenever I run my code below it returns ''</p>

<pre><code>&gt;&gt;&gt;name = input("Please input your name: ")
Please input your name: Mr. Smith 
&gt;&gt;&gt; if name == name.find(' ') and name.isalpha():
    get_initial = name[0]
&gt;&gt;&gt;get_initial
''
</code></pre>

<p>Assuming you have to find the first character of a name....</p>

<pre><code>def find_initial(name):
    i = 0
    initial_name_size = len(name)

    while True:
        name = name[i:]
        if name.isalpha():
            get_initial = name[0]
            return get_initial
        else:
            i = i+1
            if i &gt;= initial_name_size:
                return 'There is no initial'


name = input("Please input your name: ")
print find_initial(name)
</code></pre>

python