python confusion