The answer presented here: [How to work with surrogate pairs in Python?](https://stackoverflow.com/questions/38147259/how-to-work-with-surrogate-pairs-in-python) tells you how to convert a surrogate pair, such as `'\ud83d\ude4f'` into a single non-BMP unicode character (the answer being `"\ud83d\ude4f".encode('utf-16', 'surrogatepass').decode('utf-16')`). I would like to know how to do this in reverse. How can I, using Python, find the equivalent surrogate pair from a non-BMP character, converting `'\U0001f64f'` () back to `'\ud83d\ude4f'`. I couldn't find a clear answer to that.