def create_file(filename):
    'Create an empty file.'
    dirname = os.path.dirname(filename)
    if (not os.path.exists(dirname)):
        os.makedirs(dirname)
    with open(filename, 'a'):
        pass
Create an empty file.
def create_file(filename):
    
    dirname = os.path.dirname(filename)
    if (not os.path.exists(dirname)):
        os.makedirs(dirname)
    with open(filename, 'a'):
        pass