up) down) elif event key in (k_upk_wand isvalidmove(mainboardslideto up elif event key in (k_downk_sand isvalidmove(mainboardslideto down we can also let the user slide tiles by pressing keyboard keys the if and elif statements on lines to let the user set the slideto variable by either pressing the arrow keys or the wasd keys (explained latereach if and elif statement also has call to isvalidmove(to make sure that the tile can slide in that direction (we didn' have to make this call with the mouse clicks because the checks for the neighboring blank space did the same thing "equal to one oftrick with the in operator the expression event key in (k_leftk_ais just python trick to make the code simpler it is way of saying --evaluate to true if event key is equal to one of k_left or k_a|the following two expressions will evaluate the exact same wayevent key in (k_leftk_aevent key =k_left or event key =k_a you can really save on some space by using this trick when you have to check if value is equal to one of multiple values the following two expressions will evaluate the exact same wayspam ='dogor spam ='cator spam ='mouseor spam ='horseor spam = or spam ='dingospam in ('dog''cat''mouse''horse' 'dingo'wasd and arrow keys the wasand keys (together called the wasd keyspronounced --waz-dee||are commonly used in computer games to do the same thing as the arrow keysexcept the player can use their left hand instead (since the wasd keys are on the left side of the keyboardw is for upa is for lefts is for downand is for right you can easily remember this because the wasd keys have the same layout as the arrow keys