# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3 (ipykernel)
#     language: python
#     name: python3
# ---

import os
folderName = './picture/'
fileName = os.listdir(folderName)
fileName
# folderName 에 있는 디렉토리(폴더)의 파일리스트를 자동으로 작성하는 파이썬 기본
#fileName = ['pic1.jpg', 'pic2.jpg', 'pic3.jpg']

txt = fileName[0]
tmp = txt.split('.')
tmp[1]

# +
from PIL import Image   # PIL 이라는 폴더에서 image.py 를 연결

#openFileName = 0
#mage.opne(openFileName)

i = 0
#print(folderName)
#print(folderName[0])
print(fileName[0])
Image.open(folderName + fileName[i])
# -

cnt = len(fileName)
for i in range(cnt):     # for 매개변수 in range(0 : 3 - 1)
    tmp = fileName[i].split('.')[1]
    if tmp == 'jpg':
        print(folderName + fileName[i])

#txt = 'pic1.jpg'
for txt in fileName:
    print(txt[5:9])


def rightSplit(txt):
    start = len(txt) - 3
    end = len(txt)
    print(start, '~', end)
    print(txt)
    print(txt[start : end])



aa = fileName[0]
rightSplit(aa)

StarcoderdataJupyterScriptsDedupFiltered