title: Python glob.glob function not executing
body: <p>Can someone please tell me why my glob.glob statement is not executing?</p>
  <p>I have written one that works fine, but the other one does not work. Can you see what i am doing wrong.</p>
  <p>I am using pycharm.</p>
  <p>This one works</p>
  <pre><code>TC = glob.glob(&quot;L:/Support/Data_load/Tenements/%s/NSW/FME*/GSNSWDataset/TitlesCurrent.shp&quot; % (d))[0]
  
  x = arcpy.AddField_management(TC, &quot;Date_Ext&quot;, &quot;DATE&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;NULLABLE&quot;, &quot;NON_REQUIRED&quot;, &quot;&quot;)
  </code></pre>
  <p>This one does not. I have now added [0] to the end as suggested but now i just get this error instead &quot; IndexError: list index out of range&quot;</p>
  <pre><code>Moo = glob.glob(r&quot;L:\Support\Data_load\Tenements\{}\SA\Mineral tenements - exploration\Exploration Licence Applications-Mineral and_or Opal_*\Exploration Licence Applications-Mineral and_or Opal.gdb\Mineral_and_or_Opal_Exploration_Licence_Applications&quot;)[0]
  
  # Process: Add Field
  X = arcpy.AddField_management(Moo,'Test2',&quot;TEXT&quot;,&quot;&quot;,&quot;&quot;,100)
  </code></pre>