7 lines
144 B
Python
7 lines
144 B
Python
|
def keypress_handler(e):
|
||
|
if 1 <= int(e.keysym) <= 4:
|
||
|
ship_size = int(e.keysym)
|
||
|
return ship_size
|
||
|
|
||
|
|
||
|
print(keypress_handler(3))
|