On Fri, Jul 17, 2009 at 11:42 AM, Sander Sweers<sander.swe...@gmail.com> wrote:

> import time
>
> today = time.localtime()
> datestr = time.strftime("%Y%m%d",today)
> ext = ".tab"
>
> print datestr + ext

You can include literal characters in the format string:

In [4]: time.strftime("%Y%m%d.tab",today)
Out[4]: '20090717.tab'

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to