python3 list keys fix