email模塊中formataddr的作用?
formataddr函數
email.utils.formataddr(pair)和parseaddr函數相反,formataddr函數是構建郵件地址的,傳入一個tuple,返回str
>>> a=formataddr(("user","123@163.com"))
>>> a
'user <123@163.com>'
>>> type(a)
<class 'str'>
>>>
email模塊中formataddr的作用?
formataddr函數
email.utils.formataddr(pair)和parseaddr函數相反,formataddr函數是構建郵件地址的,傳入一個tuple,返回str
>>> a=formataddr(("user","123@163.com"))
>>> a
'user <123@163.com>'
>>> type(a)
<class 'str'>
>>>