Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1_homework_安晓东
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
安晓东
1_homework_安晓东
Commits
627a9269
Commit
627a9269
authored
Jan 14, 2019
by
安晓东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update homework_01.py
parent
35565e57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
homework_01.py
+10
-0
No files found.
homework_01.py
View file @
627a9269
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment