I'm using python and I'm trying to detect if someone types quit, then stop the program.
Here is my code:
print('')
while True:
    inpt = input('>>> ')
    if inpt is 'quit':
        print(':(')
        break
I run it and it doesn't work. I proceeded to try this code:
print('')
while True:
    inpt = input('>>> ')
    if inpt is 'test':
        print(':(')
        break
To see if it has something to do with the word quit, but it didn't work either. Then I tried this code:
print('')
while True:
    inpt = input('>>> ')
    if inpt is 't':
        print(':(')
        break
And it worked, but I don't know why. Does anyone know how to get quit to work?
 
     
    