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 !!!")
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.