Recall that a while True block repeats the code inside it indefinitely. In the case of this light switch, it will keep on asking for an input until we interrupt it by pressing Ctrl + C.
While this is all well and good, there’s a smoother way to break out of the loop. We can do this by utilizing the break block.