If only -d flag passed, means all items after this flag are parts of the path. python create_file.py -d dir1 dir2 - creates directory dir1/dir2 inside current directory. If only -f flag passed, means ...