On Tue, Jul 05, 2016 at 12:47:27AM +0100, Alan Gauld via Tutor wrote: > > I then tried using > > > > elif keycode == 27: > > > > but this statement didn't work. > > I'm not sure why that didn't work. > What exactly happened? Did you get a different error message? > If so what?
I expect that the keycode is always a tuple, usually with two items but sometimes with one. So keycode == 27 compares the tuple (27,) with the int 27 and finds them to be different. -- Steve _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor