0
我正在创建一个Python邮件列表,但我在函数结束时遇到了问题。有没有办法通过输入提示制作Python列表?
问题是,该列表必须是这样的:
['[email protected]', '[email protected]', '[email protected]']
我当前的代码:
mailinputs = raw_input('Enter all mails with comma: ')
receivers = [mailinputs]
如果键入:
'[email protected]', '[email protected]', '[email protected]'
一个错误出现这样的:
Probe failed: Illegal envelope To: address (invalid domain name):
否则,如果键入:
[email protected], [email protected], [email protected]
只有[email protected]接收邮件。
我该怎么办?
你的意思是一个列表,而不是字典。 – 2012-01-05 00:04:32
是的,我很抱歉。 – 2012-01-05 00:05:42