Capturing Today's Date using Python

The following brief snippet of code generates Today’s date as a string. The string it generates can be appended to the end of a filename, for example, to serve as a timestamp for pieces of code that are run only every several days.

from datetime import date

(str(date.today().year)[2:] + 
 str(date.today().month).zfill(2) +
 str(date.today().day).zfill(2))
'200301'