1import os
2
3# define the name of the directory to be created
4path = "/tmp/year"
5
6try:
7 os.mkdir(path)
8except OSError:
9 print ("Creation of the directory %s failed" % path)
10else:
11 print ("Successfully created the directory %s " % path)
12