python logic simple terms