struggling with python language syntax