본문 바로가기

Daily Develope

검색하기
Daily Develope
프로필사진 noggame

  • 분류 전체보기 (112) N
    • Develope (53)
      • Python (31)
      • Web (18)
      • ETC (4)
    • AI (16)
    • DB (6)
    • MicroService (7)
      • Docker (6)
      • Kubernetes (1)
    • OS (15)
      • Linux (10)
      • Windows (1)
      • Mac (4)
    • Git (7)
    • Algorithm (1)
    • Favorite (4) N
      • 책갈피 (4) N
      • Music (0)
Guestbook
Notice
  • migration 중입니다...
Recent Posts
Recent Comments
Link
«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
  • numpy
  • Python
  • file
  • pandas
  • GitLab
  • judge
  • Paper
  • AI
  • KAKAO
  • TORCH
  • Database
  • Package
  • git
  • evaluation
  • enV
  • PostgreSQL
  • pytorch
  • Windows
  • Laravel
  • format
  • Container
  • Converting
  • 책갈피
  • Linux
  • Mac
  • list
  • docker
  • Flask
  • DB
  • LLM
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록Search (1)

Daily Develope

[Python] 폴더 및 파일 탐색

ㅇ 폴더 및 파일 탐색 - 예) target_dir 에서 png, jpg 파일 출력 (non-recursion) target_dir = f'{os.getcwd()}/sample' for root, dirs, files in os.walk(target_dir): for file in files: if file.endswith(('.png', 'jpg')): print(file) ㅇ 파일 존재 확인 import pathlib if pathlib.Path('myfile.txt').exists(): print("exists")

Develope/Python 2022. 4. 6. 09:22
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바