Q:

while loop does not break

Hi guys i m new in python, and I have problem with this program.
When I run this program the if statement does not work.
I am giving luccy name to input, but the if statement does not process it as it should.
enter my boy name
hi
i dont have such a boy hi
enter my boy name
luccy
i dont have such a boy luccy
enter my boy name

Code:
myboys =['luccy']
while True:
    print('enter my boy name name')
    name = input()
    if name in myboys:
    print('haha he is my boy')
    break

else:
 print('i dont have such a boy ' + name)

So I edited my program as you fellas said, so now my problem is with the break statement.

A:

myboys = ['luccy']
while True:
    name = input('enter my boy name:')
    if name.strip().lower() in myboys:
        print('haha he is my boy')
        break

    else:
        print('i dont have such a boy ' + name)

name.strip().lower() will strip the leading blank spaces and lowercase the name.
HINT:
You should use set: myboys = {'luccy'}

