title: Opening Files inside of a Folder in Python
body: <p>I am writing a program that allows the user to associate "tags" to specific pictures or documents. </p>
  
  <p>Ex. "A family picture" and a "Friends Picture" are in the same file. The user wants a list of all pictures associated with their family. Instead of opening the Friends Picture it would open the Family Picture.</p>
  
  <p>When the program opens I want it to open all the files one by one allowing the user to associate the desired tags. How can I go about having the computer open multiple documents one at a time with the fact that none of the files have the same name? I would like to avoid hard coding it as it would be near impossible, to my understanding.</p>
  
  <p>In the code example below you can see that <code>var_a</code> is being used to name the window the same as the picture and also try to have the computer search for the users desired picture/document. Because you can't use variables in directories I have no clue what to do now.</p>
  
  <pre class="lang-py prettyprint-override"><code>import pygame
  
  var_a = input("Whats the name of the picture/document")
  
  window1 = pygame.display.set_mode((1370, 750))
  
  pygame.display.set_caption(var_a)
  
  image1=pygame.image.load("/Users/verdenstudent1509/Desktop/Computers/FRC Game/var_a")
  
  window1.blit(image1, (1370/3, 750/3))
  pygame.display.update()
  </code></pre>
  
  <p>I expected the program to open the file that I typed into the input as <code>var_a</code> but instead, I got this error:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):File "/Users/verdenstudent1509/Documents/(PhotoLibraryUTO).py", line 9, in 
     image1=pygame.image.load("/Users/verdenstudent1509/Desktop/Computers/FRC Game/'var_b'")<br>
    pygame.error: Couldn't open /Users/verdenstudent1509/Desktop/Computers/FRC Game/'var_b'</p>
  </blockquote>