Function giving unexpected result
<p>Could anyone explain why this function gives "None" at the end? </p>

<pre><code>def displayHand(hand):
    """
    Displays the letters currently in the hand.

    For example:
    &gt;&gt;&gt; displayHand({'a':1, 'x':2, 'l':3, 'e':1})
    Should print out something like:
       a x x l l l e
    The order of the letters is unimportant.

    hand: dictionary (string -&gt; int)
    """
    for letter in hand.keys():
        for j in range(hand[letter]):
             print(letter,end=" ")       # print all on the same line
    print()                             # print an empty line
</code></pre>

<p>The function is returning None because there is no other explicit return value; If a function has no return statement, the default is None.</p>

python function