While loop using break in Python

CODE:

while True:
    line=input('> ')
    if line=='done' or line=='Done':
        break
    print(line)
print('Done!')

OUTPUT:

> a
a
> c
c
> d
d
> w
w
> f
f
> Done
Done!
    

Comments