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 | 31 |
Tags
- 프로그래머스
- 캐치카페
- 편스토랑
- AI 경진대회
- 프로그래머스 파이썬
- 자연어처리
- Baekjoon
- 백준
- Git
- 더현대서울 맛집
- programmers
- Real or Not? NLP with Disaster Tweets
- 파이썬
- github
- hackerrank
- Kaggle
- ChatGPT
- PYTHON
- leetcode
- ubuntu
- 우분투
- gs25
- SW Expert Academy
- 금융문자분석경진대회
- 코로나19
- Docker
- dacon
- 데이콘
- 편스토랑 우승상품
- 맥북
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
반응형