반응형
Notice
Recent Posts
Recent Comments
Link
목록Python (17)
Brise
[Python Challenge] 파이썬 챌린지 - 2
http://www.pythonchallenge.com/pc/def/ocr.html 힌트로 "recognize the characters. maybe they are in the book, but MAYBE they are in the page source."와 같은 메시지가 주어져 있다. 페이지 소스를 보기 위하여 (크롬 기준) F12를 눌러 소스를 본다. 아래의 string 중 rare character들을 찾으라고 한다. 일반적으로 문자열을 거르는 방법은 regular expression을 사용하기 때문에 re 패키지를 사용한다. 소스는 다음와 같이 작성하면 결과로 equality가 나오게 된다.
프로그램/Python
2017. 2. 26. 17:02