Nit: this is succinct and Pythonic, but a little difficult to read and troubleshoot, because you're doing quite a lot in just two lines of code. It's not required, but consider splitting this up.