title: Creating empty text files with specific names in a directory
body: <p>I have two directories:</p>
  
  <pre><code>dir = path/to/annotations
  </code></pre>
  
  <p>and</p>
  
  <pre><code>dir_img = path/to/images
  </code></pre>
  
  <p>The format of image names in <code>dir_img</code> is <code>image_name.jpg</code>.</p>
  
  <p>I need to create empty text files in <code>dir</code> as: <code>image_name.txt</code>, wherein I can later store annotations corresponding to the images. I am using Python. </p>
  
  <p>I don't know how to proceed. Any help is highly appreciated. Thanks.</p>
  
  <p>[Edit]: I tried the answer given <a href="https://stackoverflow.com/questions/12654772/create-empty-file-using-python">here</a>. It ran without any error but didn't create any files either.</p>