title: encode multiple jpg files in a folder as base 64 in python
body: <p>How do I encode multiple jpeg files in a folder as base 64. Currently my code can encode one file. However I would like this to encode all the jpeg files in a folder path. </p>
  
  <pre><code>with open("path\\A.jpg", "rb") as image_file:
      encoded_string = base64.b64encode(image_file.read())
  </code></pre>
  
  <p>extract_ocr_words(encoded_string)</p>
  
  <p>In the above path there'll be multiple jpeg files such as </p>
  
  <pre><code>A.jpg
  B.jpg
  C.jpg
  </code></pre>
  
  <p>the final output should combine all the images in the folder and extract text and show as list in the final command </p>
  
  <pre><code>extract_ocr_words(encoded_string)
  
  ['ABC', 'LKM', 'GHI', 'TLI', 'CLI']
  </code></pre>