Python fails to match a predefined string with a string entered from keyboard for same values.Is there some buffer logic that i'm missing here? : <pre><code>choice = 'yes'
while choice is 'yes':
    choice = input("Enter a value for choice : ")
    # when i input 'yes' from keyboard for choice, it falls to else block.
    if choice is 'yes':
        print("As expected")
        break
    else:
        print("Need Help !!!")
</code></pre>

<p>I have even tried to match with 'yes\r', as we press 'enter' after our input from keyboard, it still failed to match. Need some insight.</p>
