Skip to main content

string_exercise_solution.py


"""
Exercise: Manipulating strings
This program aims to create a filename that contains today's date.
Continue the following script ...
"""
# we need the following line to be able to use extra tools to find the current date.
import datetime
directory='project/notes/'
category='meeting'
today=str(datetime.date.today())   # this command creates a string with today's date'
filetype='.txt'
filename=directory + category + today + filetype
print filename