@TheSav, this is because online tasks leave the keyboard.keys variable undefined until a keypress is made. You could instead try changing the Python code to the following, so that length is not specifically checked, but will still evaluate as true or false depending on the existence of a key press: