如何使用 Python 解码编码的电子邮件地址?

How to decode an encoded email address with Python?

解码以下字符串的最佳方法是什么? 我有一些正在编码的电子邮件。下面是一个示例编码电子邮件。

encoded_string = "Info@doverhouseresort.com"
decoded_string = "Info@doverhouseresort.com"

只需使用模块 html

import html
encoded_string = "Info@doverhouseresort.com"
decoded_string = html.unescape(encoded_string)