【发布时间】:2014-04-18 02:01:11
【问题描述】:
所以我正在编写一个程序,其中一部分涉及发送电子邮件。
在电子邮件正文(这是一个字符串)中,我想显示一个列表。但是,我想知道如何/或最好的方法是什么,因为现在,它只显示列表的第一个元素(自然)。如您所见,我试图放在底部的列表是:
formatted_times
下面是代码:
FROM = gmail_user
TO = ['mcgoga12@wfu.edu']
SUBJECT = "StudyBug - Study Rooms for %s" % newdate
TEXT = """
This is an automated email from StudyBug.
We wanted to let you know that the following studyrooms were booked for %s:
%s
Thank You,
StudyBug
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
Check out the project page!: https://github.com/g12mcgov/StudyBug
""" % (newdate, formatted_times)
【问题讨论】: