본문 바로가기

Daily Develope

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

  • 분류 전체보기 (116)
    • Develope (56)
      • Python (33)
      • Web (19)
      • ETC (4)
    • AI (16)
    • DB (6)
    • MicroService (7)
      • Docker (6)
      • Kubernetes (1)
    • OS (16)
      • Linux (11)
      • Windows (1)
      • Mac (4)
    • Git (7)
    • Algorithm (1)
    • Favorite (4)
      • 책갈피 (4)
      • Music (0)
Guestbook
Notice
  • migration 중입니다...
Recent Posts
Recent Comments
Link
«   2026/01   »
일 월 화 수 목 금 토
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 31
Tags
  • AI
  • GitLab
  • Mac
  • judge
  • DB
  • Container
  • pytorch
  • PostgreSQL
  • Linux
  • format
  • Package
  • Laravel
  • file
  • git
  • docker
  • pandas
  • list
  • evaluation
  • KAKAO
  • LLM
  • Converting
  • Database
  • Python
  • Windows
  • 책갈피
  • Paper
  • ubuntu
  • numpy
  • Flask
  • TORCH
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록string (1)

Daily Develope

[Python] 매칭 (문자열 / 리스트 / 정규식)

문자열 매칭 s = "오늘은 기분이 '매우' 좋습니다." # 단순 문자열 확인 print("기분이" in s)# True print("나쁩니다" in s)# False # 정의된 문자열 리스트 중 일치하는 단어가 있는지 확인 print(any(x in s for x in ["좋습니다", "나쁩니다"])) # True print(any(x in s for x in ["그저그래요", "나쁩니다"])) # False # 정의된 문자열 리스트 모두가 일치하는지 확인 print(all(x in s for x in ["오늘은", "좋습니다"]))# True print(all(x in s for x in ["오늘은", "나쁩니다"]))# False 리스트 매칭 a=["hello", "world", "python"] ..

Develope/Python 2022. 1. 15. 11:19
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바