Commit 627a9269 by 安晓东

Update homework_01.py

parent 35565e57
......@@ -36,6 +36,16 @@
# J = "z"
# S = "ZZ"
# numJewelsInStones(J, S)
# 宝石与石头
# def peakIndexInMountainArray(A):
# """
# :type A: List[int]
# :rtype: int
# """
# return A.index(max(A))
# peakIndexInMountainArray([0,1,0]) # 预期输出 1
import re
s ='1324.231.432.1234,192.168.1.6,10.25.11.8这些信息中,哪些是ip呢?'
ret = re.findall('((?:(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d?\d))', s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment