Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 백준
- 캐치카페
- 프로그래머스
- 프로그래머스 파이썬
- github
- programmers
- Docker
- 더현대서울 맛집
- ChatGPT
- Baekjoon
- ubuntu
- AI 경진대회
- 데이콘
- 코로나19
- hackerrank
- 편스토랑
- SW Expert Academy
- 금융문자분석경진대회
- 편스토랑 우승상품
- PYTHON
- 파이썬
- dacon
- leetcode
- Real or Not? NLP with Disaster Tweets
- 맥북
- Git
- 자연어처리
- 우분투
- Kaggle
- gs25
Archives
- Today
- Total
목록
반응형
468. Validate IP Address (1)
반응형
솜씨좋은장씨
[leetCode] 468. Validate IP Address (Python)
Given a string IP, return "IPv4" if IP is a valid IPv4 address, "IPv6" if IP is a valid IPv6 address or "Neither" if IP is not a correct IP of any type. A valid IPv4 address is an IP in the form "x1.x2.x3.x4" where 0 4: return "Neither" for c in ip: if c.lower() not in '0123456789abcdef': return "Neither" return "IPv6" if len(IP.split("."))-1 == 3: return checkIPv4(IP) elif len(IP.split(":"))-1 ..
Programming/코딩 1일 1문제
2020. 11. 22. 17:21
반응형